Ticket #1263: sugar-1263.patch

File sugar-1263.patch, 1.5 KB (added by alsroot, 12 years ago)
  • src/sugar/activity/activity.py

    From 4ac5991fcf069ef8bb8536240cee078626e26797 Mon Sep 17 00:00:00 2001
    From: Aleksey Lim <alsroot@member.fsf.org>
    Date: Fri, 4 Sep 2009 17:14:18 +0000
    Subject: Fullscreen resizing issues #1263
    
    ---
     src/sugar/activity/activity.py |    6 +++++-
     1 files changed, 5 insertions(+), 1 deletions(-)
    
    diff --git a/src/sugar/activity/activity.py b/src/sugar/activity/activity.py
    index 0540bb1..5125baf 100644
    a b class Activity(Window, gtk.Container): 
    249249        if os.environ.has_key('SUGAR_ACTIVITY_ROOT'):
    250250            # If this activity runs inside Sugar, we want it to take all the
    251251            # screen. Would be better if it was the shell to do this, but we
    252             # haven't found yet a good way to do it there.
     252            # haven't found yet a good way to do it there. See #1263.
     253            self.connect('window-state-event', self.__window_state_event_cb)
    253254            screen = gtk.gdk.screen_get_default()
    254255            screen.connect('size-changed', self.__screen_size_changed_cb)
    255256            self._adapt_window_to_screen()
    class Activity(Window, gtk.Container): 
    405406    def __screen_size_changed_cb(self, screen):
    406407        self._adapt_window_to_screen()
    407408
     409    def __window_state_event_cb(self, window, event):
     410        self.move(0, 0)
     411
    408412    def _adapt_window_to_screen(self):
    409413        screen = gtk.gdk.screen_get_default()
    410414        self.set_geometry_hints(None,