[sugar] [PATCH] unfreeze DCON when Sugar UI is (almost) ready to show

Bernardo Innocenti bernie at codewiz.org
Wed Jun 13 19:59:08 EDT 2007


This is part of a masterplan to implement #621 .
---
 shell/hardware/hardwaremanager.py |    6 ++++++
 shell/view/Shell.py               |    3 +++
 2 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/shell/hardware/hardwaremanager.py b/shell/hardware/hardwaremanager.py
index f23af25..c962b28 100644
--- a/shell/hardware/hardwaremanager.py
+++ b/shell/hardware/hardwaremanager.py
@@ -69,6 +69,12 @@ class HardwareManager(object):
             logging.error('Cannot mute the audio channel')
         self._mixer.set_mute(self._master, mute)
 
+    def set_dcon_freeze(self, frozen):
+        if not self._service:
+            return
+
+        self._service.set_dcon_freeze(frozen)
+
     def set_display_mode(self, mode):
         if not self._service:
             return
diff --git a/shell/view/Shell.py b/shell/view/Shell.py
index 892123c..75bfd93 100644
--- a/shell/view/Shell.py
+++ b/shell/view/Shell.py
@@ -68,6 +68,9 @@ class Shell(gobject.GObject):
 
         self.start_activity('org.laptop.JournalActivity')
 
+        # Unfreeze the display when it's stable
+        get_hardware_manager().set_dcon_freeze(0)
+
     def _activity_started_cb(self, home_model, home_activity):
         activity_host = ActivityHost(home_activity)
         self._hosts[activity_host.get_xid()] = activity_host
-- 
1.5.2



More information about the Sugar mailing list