Skip to content

Commit

Permalink
Fix quit/focus bug
Browse files Browse the repository at this point in the history
Signed-off-by: Gaetan Semet <[email protected]>
  • Loading branch information
gsemet committed Jul 11, 2014
1 parent 921bfeb commit 7234aba
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/guake
Original file line number Diff line number Diff line change
Expand Up @@ -683,6 +683,8 @@ class Guake(SimpleGladeApp):
# since theme has not been applied before first show_all
self.selected_color = None

self.isPromptQuitDialogOpened = False

# trayicon!
try:
import appindicator
Expand Down Expand Up @@ -914,6 +916,9 @@ class Guake(SimpleGladeApp):
if self.disable_losefocus_hiding or self.showing_context_menu:
return

if self.isPromptQuitDialogOpened:
return

value = self.client.get_bool(KEY('/general/window_losefocus'))
visible = window.get_property('visible')
if value and visible:
Expand Down Expand Up @@ -1202,9 +1207,11 @@ class Guake(SimpleGladeApp):
if self.client.get_bool(KEY('/general/prompt_on_quit')):
procs = self.get_running_fg_processes()
if procs >= 1:
self.isPromptQuitDialogOpened = True
dialog = PromptQuitDialog(self.window, procs)
response = dialog.run() == gtk.RESPONSE_YES
dialog.destroy()
self.isPromptQuitDialogOpened = False
if response:
gtk.main_quit()
else:
Expand Down

0 comments on commit 7234aba

Please sign in to comment.