Skip to content

Commit

Permalink
better debug logging, type hint
Browse files Browse the repository at this point in the history
  • Loading branch information
totaam committed Jun 7, 2023
1 parent 8945787 commit 8bf9ce9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions xpra/client/gtk3/gtk_client_window_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,7 @@ def init_window(self, metadata):
self._follow_handler = 0
self._follow_position = None
self._follow_configure = None
self.recheck_focus_timer : int = 0
self.window_state_timer : int = 0
self.send_iconify_timer : int = 0
self.remove_pointer_overlay_timer : int = 0
Expand Down Expand Up @@ -458,7 +459,6 @@ def got_file_data(gfile, result, user_data=None):
######################################################################
# focus:
def init_focus(self) -> None:
self.recheck_focus_timer = 0
self.when_realized("init-focus", self.do_init_focus)

def do_init_focus(self) -> None:
Expand Down Expand Up @@ -506,7 +506,7 @@ def recheck_focus(self) -> None:

def send_latest_focus(self) -> None:
focused = self._client._focused
focuslog("recheck_focus() wid=%i, focused=%s, latest=%s", self.wid, focused, self._focus_latest)
focuslog("send_latest_focus() wid=%i, focused=%s, latest=%s", self.wid, focused, self._focus_latest)
if self._focus_latest:
self._focus()
else:
Expand Down Expand Up @@ -565,6 +565,7 @@ def schedule_recheck_focus(self) -> None:
if FOCUS_RECHECK_DELAY<0:
self.recheck_focus()
elif self.recheck_focus_timer==0:
focuslog(f"will recheck focus in {FOCUS_RECHECK_DELAY}ms")
self.recheck_focus_timer = self.timeout_add(FOCUS_RECHECK_DELAY, self.recheck_focus)

def do_xpra_focus_out_event(self, event) -> None:
Expand Down

0 comments on commit 8bf9ce9

Please sign in to comment.