diff options
author | Aleksey Lim <alsroot@member.fsf.org> | 2009-09-29 18:33:13 (GMT) |
---|---|---|
committer | Aleksey Lim <alsroot@member.fsf.org> | 2009-09-29 18:33:13 (GMT) |
commit | 8f52b0a8f4a0c8381dd23435eb73d640a698d07f (patch) | |
tree | bbf24468c59ab3e49d8dab17606fe752ae89156e /src/sugar/graphics | |
parent | 95f065cb9f85481d1c35eb5820f9439ae1b059f9 (diff) |
Present windows in non-active process #1423
Diffstat (limited to 'src/sugar/graphics')
-rw-r--r-- | src/sugar/graphics/window.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/sugar/graphics/window.py b/src/sugar/graphics/window.py index 967217a..885877d 100644 --- a/src/sugar/graphics/window.py +++ b/src/sugar/graphics/window.py @@ -118,6 +118,21 @@ class Window(gtk.Window): self.__unfullscreen_button_pressed) self._unfullscreen_button_timeout_id = None + def reveal(self): + """ Make window active + + In contrast with present(), brings window to the top + even after invoking on response on non-gtk events. + See #1423. + """ + if self.window is None: + self.show() + return + timestamp = gtk.get_current_event_time() + if not timestamp: + timestamp = gtk.gdk.x11_get_server_time(self.window) + self.window.focus(timestamp) + def fullscreen(self): palettegroup.popdown_all() if self._toolbar_box is not None: |