From f7eb9cc500354a28bdc598f58a6996156ed99c2f Mon Sep 17 00:00:00 2001 From: Celio Grand Date: Mon, 20 Jun 2022 22:08:37 +0800 Subject: [PATCH] Fix 0 timestamp #1857 #1950 --- guake/guake_app.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/guake/guake_app.py b/guake/guake_app.py index 6e86791c4..874afb0dc 100644 --- a/guake/guake_app.py +++ b/guake/guake_app.py @@ -582,7 +582,8 @@ def show_hide(self, *args): if not self.window.get_property("visible"): log.debug("Showing the terminal") self.show() - self.window.get_window().focus(0) + server_time = get_server_time(self.window) + self.window.get_window().focus(server_time) self.set_terminal_focus() return @@ -590,7 +591,8 @@ def show_hide(self, *args): has_focus = self.window.get_window().get_state() & Gdk.WindowState.FOCUSED if should_refocus and not has_focus: log.debug("Refocussing the terminal") - self.window.get_window().focus(0) + server_time = get_server_time(self.window) + self.window.get_window().focus(server_time) self.set_terminal_focus() else: log.debug("Hiding the terminal")