Skip to content

Commit

Permalink
Fix 0 timestamp #1857 #1950
Browse files Browse the repository at this point in the history
  • Loading branch information
c31io authored and Davidy22 committed Jun 20, 2022
1 parent 2852973 commit 5c99cab
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions guake/guake_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -582,15 +582,17 @@ 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

should_refocus = self.settings.general.get_boolean("window-refocus")
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")
Expand Down

0 comments on commit 5c99cab

Please sign in to comment.