From 1b8025714922d3f74c95908e19713a4c31d4d031 Mon Sep 17 00:00:00 2001 From: Aleksey Lim Date: Sat, 5 Sep 2009 16:40:15 +0000 Subject: [PATCH] Fullscreen resizing issues #1263 --- src/sugar/activity/activity.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/sugar/activity/activity.py b/src/sugar/activity/activity.py index 0540bb12..5125bafb 100644 --- a/src/sugar/activity/activity.py +++ b/src/sugar/activity/activity.py @@ -249,7 +249,8 @@ class Activity(Window, gtk.Container): if os.environ.has_key('SUGAR_ACTIVITY_ROOT'): # If this activity runs inside Sugar, we want it to take all the # screen. Would be better if it was the shell to do this, but we - # haven't found yet a good way to do it there. + # haven't found yet a good way to do it there. See #1263. + self.connect('window-state-event', self.__window_state_event_cb) screen = gtk.gdk.screen_get_default() screen.connect('size-changed', self.__screen_size_changed_cb) self._adapt_window_to_screen() @@ -405,6 +406,9 @@ class Activity(Window, gtk.Container): def __screen_size_changed_cb(self, screen): self._adapt_window_to_screen() + def __window_state_event_cb(self, window, event): + self.move(0, 0) + def _adapt_window_to_screen(self): screen = gtk.gdk.screen_get_default() self.set_geometry_hints(None,