[maemo-commits] [maemo-commits] r17615 - in projects/haf/trunk/libmatchbox2: . matchbox/core

From: subversion at stage.maemo.org subversion at stage.maemo.org
Date: Tue Mar 10 02:22:23 EET 2009
Author: tthurman
Date: 2009-03-10 02:22:18 +0200 (Tue, 10 Mar 2009)
New Revision: 17615

Modified:
   projects/haf/trunk/libmatchbox2/ChangeLog
   projects/haf/trunk/libmatchbox2/matchbox/core/mb-window-manager.c
Log:
        Fixes: NB#103954.

        * matchbox/core/mb-window-manager.c: although any window which
        has no parents is considered system-modal, this does not include
        the desktop!



Modified: projects/haf/trunk/libmatchbox2/ChangeLog
===================================================================
--- projects/haf/trunk/libmatchbox2/ChangeLog	2009-03-09 16:42:45 UTC (rev 17614)
+++ projects/haf/trunk/libmatchbox2/ChangeLog	2009-03-10 00:22:18 UTC (rev 17615)
@@ -1,3 +1,11 @@
+2009-03-09  Thomas Thurman  <thomas.thurman at collabora.co.uk>
+
+        Fixes: NB#103954.
+	
+	* matchbox/core/mb-window-manager.c: although any window which
+	has no parents is considered system-modal, this does not include
+	the desktop!
+
 2009-03-09  Gordon Williams  <gordon.williams at collabora.co.uk>
 
 	* matchbox/comp-mgr/mb-wm-comp-mgr-clutter.c:

Modified: projects/haf/trunk/libmatchbox2/matchbox/core/mb-window-manager.c
===================================================================
--- projects/haf/trunk/libmatchbox2/matchbox/core/mb-window-manager.c	2009-03-09 16:42:45 UTC (rev 17614)
+++ projects/haf/trunk/libmatchbox2/matchbox/core/mb-window-manager.c	2009-03-10 00:22:18 UTC (rev 17615)
@@ -1793,6 +1793,8 @@
   MBWindowManagerClass  *wm_klass;
   wm_klass = MB_WINDOW_MANAGER_CLASS (MB_WM_OBJECT_GET_CLASS (wm));
 
+  g_warning ("MBWMAC\n");
+
   MBWM_ASSERT (wm_klass->client_activate);
 
   wm_klass->client_activate (wm, c);
@@ -1808,6 +1810,8 @@
   MBWindowManagerClient * c_focus = c;
   MBWindowManagerClient * trans, *last_focused_transient;
 
+  g_warning ("MBWMAC REAL\n");
+
   if (c == NULL)
     return False;
 
@@ -1957,6 +1961,11 @@
   MBWindowManagerClient *client = c,
     *last_focused_transient,
     *focused_clients_parent;
+
+  /* types of clients that can't be system modal */
+  const int cannot_be_system_modal =
+    MBWMClientTypePanel |
+    MBWMClientTypeDesktop;
  
   last_focused_transient = mb_wm_client_get_last_focused_transient (c);
 
@@ -2000,6 +2009,8 @@
           of a system-modal window) */
       (wm->modality_type == MBWMModalitySystem &&
        !focused_clients_parent &&
+       wm->focused_client &&
+       !(MB_WM_CLIENT_CLIENT_TYPE (wm->focused_client) & cannot_be_system_modal) &&
        mb_wm_client_get_transient_for (client) &&
        wm->focused_client != mb_wm_client_get_transient_for (client))
       )
@@ -2023,6 +2034,7 @@
 
   if (mb_wm_client_focus (client))
     {
+      /* FIXME this appears not to do anything */
       if (wm->focused_client)
 	{
 	  MBWindowManagerClient *trans_old = wm->focused_client;
@@ -2050,11 +2062,7 @@
   if (client != wm->focused_client)
     return;
 
-  /* FIXME: shouldn't we always start from top of the stack, because
-   * the next client might not want focus? */
-  next = mb_wm_client_get_next_focused_client (client);
-
-  if (!next && wm->stack_top)
+  if (wm->stack_top)
     {
       MBWindowManagerClient *c;
 
@@ -2071,7 +2079,9 @@
   wm->focused_client = NULL;
 
   if (next)
-	mb_wm_focus_client (wm, next);
+    {
+      mb_wm_focus_client (wm, next);
+    }
 }
 
 void


More information about the maemo-commits mailing list