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

From: subversion at stage.maemo.org subversion at stage.maemo.org
Date: Wed Jun 10 03:52:16 EEST 2009
Author: tthurman
Date: 2009-06-10 03:52:12 +0300 (Wed, 10 Jun 2009)
New Revision: 18685

Modified:
   projects/haf/trunk/libmatchbox2/ChangeLog
   projects/haf/trunk/libmatchbox2/matchbox/core/mb-window-manager.c
Log:
	NB#118850
	* matchbox/core/mb-window-manager.c: When a window loses the
	focus, and we look for a window to focus instead, don't
	attempt to focus any window which can't take the focus!



Modified: projects/haf/trunk/libmatchbox2/ChangeLog
===================================================================
--- projects/haf/trunk/libmatchbox2/ChangeLog	2009-06-09 15:27:01 UTC (rev 18684)
+++ projects/haf/trunk/libmatchbox2/ChangeLog	2009-06-10 00:52:12 UTC (rev 18685)
@@ -1,3 +1,11 @@
+2009-06-09  Thomas Thurman  <thomas.thurman at collabora.co.uk>
+
+	NB#118850
+	
+	* matchbox/core/mb-window-manager.c: When a window loses the
+	focus, and we look for a window to focus instead, don't
+	attempt to focus any window which can't take the focus!
+
 2009-06-08  Kimmo Hämäläinen  <kimmo.hamalainen at nokia.com>
 
 	Release 0.2.42

Modified: projects/haf/trunk/libmatchbox2/matchbox/core/mb-window-manager.c
===================================================================
--- projects/haf/trunk/libmatchbox2/matchbox/core/mb-window-manager.c	2009-06-09 15:27:01 UTC (rev 18684)
+++ projects/haf/trunk/libmatchbox2/matchbox/core/mb-window-manager.c	2009-06-10 00:52:12 UTC (rev 18685)
@@ -2103,6 +2103,21 @@
 
   wm->focused_client = NULL;
 
+  /* If a window can't be focussed, don't attempt to focus it.
+   * Instead, just skip over it and try the next one.
+   * (NB#118850.)
+   */
+
+  while (next &&
+	 MB_WM_CLIENT_CLASS( mb_wm_object_get_class
+			     (MB_WM_OBJECT (next)))->focus==NULL)
+    {
+      g_warning ("Skipping %x because it can't be focussed\n",
+		 next->window->xwindow);
+
+      next = next->stacked_below;    
+    }
+
   if (next)
     {
       mb_wm_focus_client (wm, next);

More information about the maemo-commits mailing list