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

From: subversion at stage.maemo.org subversion at stage.maemo.org
Date: Thu Jun 11 02:01:16 EEST 2009
Author: tthurman
Date: 2009-06-11 02:01:10 +0300 (Thu, 11 Jun 2009)
New Revision: 18697

Modified:
   projects/haf/trunk/libmatchbox2/ChangeLog
   projects/haf/trunk/libmatchbox2/matchbox/core/mb-window-manager.c
Log:
	* matchbox/core/mb-window-manager.c: Amendment to previous
	fix.  Let's focus windows if they are apps or dialogues
	or menus, rather than just if they are able to take the
	focus.



Modified: projects/haf/trunk/libmatchbox2/ChangeLog
===================================================================
--- projects/haf/trunk/libmatchbox2/ChangeLog	2009-06-10 15:27:32 UTC (rev 18696)
+++ projects/haf/trunk/libmatchbox2/ChangeLog	2009-06-10 23:01:10 UTC (rev 18697)
@@ -1,3 +1,10 @@
+2009-06-10  Thomas Thurman  <thomas.thurman at collabora.co.uk>
+
+	* matchbox/core/mb-window-manager.c: Amendment to previous
+	fix.  Let's focus windows if they are apps or dialogues
+	or menus, rather than just if they are able to take the
+	focus.
+
 2009-06-09  Thomas Thurman  <thomas.thurman at collabora.co.uk>
 
 	NB#118850

Modified: projects/haf/trunk/libmatchbox2/matchbox/core/mb-window-manager.c
===================================================================
--- projects/haf/trunk/libmatchbox2/matchbox/core/mb-window-manager.c	2009-06-10 15:27:32 UTC (rev 18696)
+++ projects/haf/trunk/libmatchbox2/matchbox/core/mb-window-manager.c	2009-06-10 23:01:10 UTC (rev 18697)
@@ -2108,20 +2108,26 @@
    * (NB#118850.)
    */
 
-  while (next &&
-	 MB_WM_CLIENT_CLASS( mb_wm_object_get_class
-			     (MB_WM_OBJECT (next)))->focus==NULL)
+  while (next && !(MB_WM_IS_CLIENT_APP (next) ||
+		   MB_WM_PARENT_IS_CLIENT_APP (next) ||
+		   MB_WM_IS_CLIENT_MENU (next) ||
+		   MB_WM_IS_CLIENT_DIALOG (next) ||
+		   MB_WM_PARENT_IS_CLIENT_DIALOG (next)))
     {
-      g_warning ("Skipping %x because it can't be focussed\n",
-		 next->window->xwindow);
+      g_debug ("Skipping %x because it's not focusable %d\n",
+	       next->window->xwindow,
+	       MB_WM_OBJECT_GET_CLASS (next));
 
       next = next->stacked_below;    
     }
 
   if (next)
     {
+      g_debug ("Focussing %x", next->window->xwindow);
       mb_wm_focus_client (wm, next);
     }
+  else
+    g_debug ("Ran out of windows to focus.\n");
 }
 
 void

More information about the maemo-commits mailing list