Skip to content

Commit

Permalink
use a looser coupling with display and cursor modules
Browse files Browse the repository at this point in the history
  • Loading branch information
totaam committed Feb 17, 2025
1 parent 8c76df9 commit 0db1474
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
9 changes: 7 additions & 2 deletions xpra/x11/server/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -311,9 +311,14 @@ def update_all_server_settings(self, reset=False) -> None:
def update_server_settings(self, settings=None, reset=False) -> None:
if not features.display:
return
cursor_size = getattr(self, "cursor_size", 0)
dpi = getattr(self, "dpi", 0)
antialias = getattr(self, "antialias", {})
double_click_time = getattr(self, "double_click_time", 0)
double_click_distance = getattr(self, "double_click_distance", (-1, -1))
self.do_update_server_settings(settings or self._settings, reset,
self.dpi, self.double_click_time, self.double_click_distance,
self.antialias, self.cursor_size)
dpi, double_click_time, double_click_distance,
antialias, cursor_size)

def do_update_server_settings(self, settings, reset=False,
dpi=0, double_click_time=0, double_click_distance=(-1, -1),
Expand Down
3 changes: 2 additions & 1 deletion xpra/x11/server/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -815,7 +815,8 @@ def fake_key(self, keycode, press) -> None:
X11Keyboard.xtest_fake_key(keycode, press)

def do_x11_cursor_event(self, event) -> None:
if not self.cursors:
cursors = getattr(self, "cursors", False)
if not cursors:
return
if self.last_cursor_serial == event.cursor_serial:
cursorlog("ignoring cursor event %s with the same serial number %s", event, self.last_cursor_serial)
Expand Down

0 comments on commit 0db1474

Please sign in to comment.