Skip to content

Commit

Permalink
skip Gtk to avoid pointless deprecation warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
totaam committed Jan 24, 2024
1 parent f1342ad commit 8ccb52c
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
11 changes: 11 additions & 0 deletions xpra/x11/bindings/keyboard.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -1140,3 +1140,14 @@ cdef class X11KeyboardBindingsInstance(X11CoreBindingsInstance):
XQueryPointer(self.display, root_window, &root, &child,
&root_x, &root_y, &win_x, &win_y, &mask)
return root_x, root_y

def query_mask(self):
self.context_check("query_mask")
cdef Window root_window = XDefaultRootWindow(self.display)
cdef Window root, child
cdef int root_x, root_y
cdef int win_x, win_y
cdef unsigned int mask
XQueryPointer(self.display, root_window, &root, &child,
&root_x, &root_y, &win_x, &win_y, &mask)
return mask
3 changes: 2 additions & 1 deletion xpra/x11/server/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -945,7 +945,8 @@ def do_process_mouse_common(self, proto, device_id: int, wid: int, pointer, prop
mouselog("do_process_mouse_common%s", (proto, device_id, wid, pointer, props))
if self.readonly:
return False
pos = self.root_window.get_pointer()[-3:-1]
with xsync:
pos = X11Keyboard.query_pointer()
if (pointer and pos != pointer[:2]) or self.input_devices=="xi":
with xswallow:
self._move_pointer(device_id, wid, pointer, props)
Expand Down
2 changes: 1 addition & 1 deletion xpra/x11/server/keyboard_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -575,7 +575,7 @@ def get_current_mask(self) -> list:
root = get_default_root_window()
if not root:
return []
current_mask = root.get_pointer()[-1]
current_mask = X11Keyboard.query_mask()
return mask_to_names(current_mask, self.modifier_map)

def make_keymask_match(self, modifier_list, ignored_modifier_keycode=None, ignored_modifier_keynames=None) -> None:
Expand Down

0 comments on commit 8ccb52c

Please sign in to comment.