From 3dcf4ce1b9dd7f6bdb5143edb2487c33ac4744f7 Mon Sep 17 00:00:00 2001
From: Daniel Drake <dsd@laptop.org>
Date: Wed, 25 Nov 2009 12:48:06 +0000
Subject: [PATCH] Activate windows when changing to activity view
This patch fixes a bug where pressing F4 immediately after starting
Sugar does not switch to the Journal.
This happened because the Journal has not yet been activated, so when
the desktop is hidden in response to pressing F4, there is no active
window to take over the display. The journal starts in iconified state.
---
src/jarabe/model/shell.py | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/src/jarabe/model/shell.py b/src/jarabe/model/shell.py
index de5a66f..fe12b17 100644
a
|
b
|
class ShellModel(gobject.GObject): |
370 | 370 | show_desktop = new_level is not self.ZOOM_ACTIVITY |
371 | 371 | self._screen.toggle_showing_desktop(show_desktop) |
372 | 372 | |
| 373 | if new_level is self.ZOOM_ACTIVITY: |
| 374 | # activate the window, in case it was iconified |
| 375 | # (e.g. during sugar launch, the Journal starts in this state) |
| 376 | window = self._active_activity.get_window() |
| 377 | if window: |
| 378 | window.activate(gtk.get_current_event_time()) |
| 379 | |
373 | 380 | def _get_zoom_level(self): |
374 | 381 | return self._zoom_level |
375 | 382 | |