[Sugar-devel] [PATCH 2/2] trace flipping windows for debugging purposes dlo#10683

martin.langhoff at gmail.com martin.langhoff at gmail.com
Sat Feb 12 14:10:31 EST 2011


From: Simon Schampijer <simon at schampijer.de>

badly behaved activities flip windows quickly, add log for
tracing them
---
 src/jarabe/model/shell.py |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/jarabe/model/shell.py b/src/jarabe/model/shell.py
index bd7e367..f01eb8e 100644
--- a/src/jarabe/model/shell.py
+++ b/src/jarabe/model/shell.py
@@ -504,6 +504,9 @@ class ShellModel(gobject.GObject):
         return self._activities.index(obj)
 
     def _window_opened_cb(self, screen, window):
+        # badly behaved activities flip windows quickly
+        # trace it for debugging purposes dlo#10683
+        logging.debug('_window_opened_cb wnd %s' % window)
         if window.get_window_type() == wnck.WINDOW_NORMAL:
             home_activity = None
 
@@ -536,8 +539,8 @@ class ShellModel(gobject.GObject):
                     and home_activity.get_launch_status() == Activity.LAUNCHING:
                 self.emit('launch-completed', home_activity)
                 startup_time = time.time() - home_activity.get_launch_time()
-                logging.debug('%s launched in %f seconds.',
-                    home_activity.get_type(), startup_time)
+                logging.debug('%s launched in %f seconds.' %
+                                   (service_name, startup_time))
 
             if self._active_activity is None:
                 self._set_active_activity(home_activity)
-- 
1.7.3.4



More information about the Sugar-devel mailing list