updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / guake-focus / focus.patch
blob8f9f1005f37094754ccb3422530e24db29a17111
1 diff -Naur OLD//src/guake.py NEW//src/guake.py
2 --- OLD//src/guake.py 2010-01-20 11:23:00.000000000 +0100
3 +++ NEW//src/guake.py 2010-04-09 08:18:28.000000000 +0200
4 @@ -737,11 +737,16 @@
5 self.losefocus_time = 0
6 return
8 - if not self.window.get_property('visible'):
9 - self.show()
10 - self.set_terminal_focus()
11 + if self.window.get_property('visible'):
12 + screen = self.window.get_screen()
13 + if screen.get_active_window() == self.window.window:
14 + self.hide()
15 + else:
16 + self.show()
17 + self.set_terminal_focus()
18 else:
19 - self.hide()
20 + self.show()
21 + self.set_terminal_focus()
23 def show(self):
24 """Shows the main window and grabs the focus on it.