Ticket #1311: sugar-1311.patch

File sugar-1311.patch, 1.3 KB (added by alsroot, 12 years ago)
  • src/jarabe/desktop/homewindow.py

    From 6887bf1053ec62fa8fd979fb1b57273c1222292c Mon Sep 17 00:00:00 2001
    From: Aleksey Lim <alsroot@member.fsf.org>
    Date: Wed, 9 Sep 2009 17:05:41 +0000
    Subject: Do not reseting resume mode on every visibility change #1311
    
    ---
     src/jarabe/desktop/homewindow.py |    8 +++++++-
     1 files changed, 7 insertions(+), 1 deletions(-)
    
    diff --git a/src/jarabe/desktop/homewindow.py b/src/jarabe/desktop/homewindow.py
    index 8882cec..50fa70c 100644
    a b class HomeWindow(gtk.Window): 
    4343        self.add_accel_group(accel_group)
    4444
    4545        self._active = False
     46        self._fully_obscured = True
    4647
    4748        self.set_default_size(gtk.gdk.screen_width(),
    4849                              gtk.gdk.screen_height())
    class HomeWindow(gtk.Window): 
    8687            self._mesh_box.resume()
    8788
    8889    def _visibility_notify_event_cb(self, window, event):
    89         if event.state == gtk.gdk.VISIBILITY_FULLY_OBSCURED:
     90        fully_obscured = (event.state == gtk.gdk.VISIBILITY_FULLY_OBSCURED)
     91        if self._fully_obscured == fully_obscured:
     92            return
     93        self._fully_obscured = fully_obscured
     94
     95        if fully_obscured:
    9096            self._deactivate_view(shell.get_model().zoom_level)
    9197        else:
    9298            display = gtk.gdk.display_get_default()