Xlib и искал экран с помощью мыши следующим образом:
Код: Выделить всё
from Xlib import display
def mousepos():
data = display.Display().screen().root.query_pointer()._data
return data["root_x"], data["root_y"]
current_pos = mousepos()
x_pos = current_pos[0]
y_pos = current_pos[1]
names_handling_y = []
names_handling_x = []
...
if x_pos >= output["pos"]["x"] and x_pos = output["pos"]["y"] and y_pos
Подробнее здесь: [url]https://stackoverflow.com/questions/72681309/how-can-i-get-current-active-screen-a-screen-with-mouse-in-kde-wayland[/url]
Мобильная версия