[kupfer] ui: Use a timer to hide main window after launch-callback
- From: Ulrik Sverdrup <usverdrup src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [kupfer] ui: Use a timer to hide main window after launch-callback
- Date: Sun, 9 May 2010 15:55:28 +0000 (UTC)
commit 57050dad7c0ff98e49df839114752196fa95157b
Author: Ulrik Sverdrup <ulrik sverdrup gmail com>
Date: Sun May 9 16:25:25 2010 +0100
ui: Use a timer to hide main window after launch-callback
kupfer/ui/browser.py | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/kupfer/ui/browser.py b/kupfer/ui/browser.py
index 724cd0a..b68b95a 100644
--- a/kupfer/ui/browser.py
+++ b/kupfer/ui/browser.py
@@ -1417,6 +1417,7 @@ class WindowController (pretty.OutputMixin):
self.interface.connect("cancelled", self._cancelled)
self._setup_window()
self._statusicon = None
+ self._window_hide_timer = scheduler.Timer()
def show_statusicon(self):
if not self._statusicon:
@@ -1489,7 +1490,7 @@ class WindowController (pretty.OutputMixin):
# Separate window hide from the action being
# done. This is to solve a window focus bug when
# we switch windows using an action
- gobject.idle_add(self.put_away)
+ self._window_hide_timer.set_ms(100, self.put_away)
def result_callback(self, sender, result_type):
self.activate()
@@ -1514,6 +1515,7 @@ class WindowController (pretty.OutputMixin):
self.output_debug("Moving window to", self.window_position)
def activate(self, sender=None, time=0):
+ self._window_hide_timer.invalidate()
self._move_window_to_position()
if not time:
time = (gtk.get_current_event_time() or
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]