Exemple #1
0
Fichier : X.py Projet : Difrex/azot
def get_cursor_position():
    while 1:
        try:
            data = root_window.query_pointer()._data

            return {"x": data["root_x"], "y": data["root_y"]}
        except Exception as e:
            warning(str(e) + "\n" + "Spleep for 10 second")
            sleep(10)
Exemple #2
0
Fichier : X.py Projet : Difrex/azot
def get_geometry():
    while 1:
        try:
            width = working_screen.width_in_pixels
            height = working_screen.height_in_pixels

            return {"x": width, "y": height}
        except Exception as e:
            warning(str(e) + "\n" + "Spleep for 10 second")
            sleep(10)