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

From: subversion at stage.maemo.org subversion at stage.maemo.org
Date: Wed May 13 09:45:03 EEST 2009
Author: kihamala
Date: 2009-05-13 09:44:59 +0300 (Wed, 13 May 2009)
New Revision: 18343

Modified:
   projects/haf/trunk/libmatchbox2/ChangeLog
   projects/haf/trunk/libmatchbox2/matchbox/core/mb-wm-client.c
Log:
enumerate from the top of the stack, instead of from bottom


Modified: projects/haf/trunk/libmatchbox2/ChangeLog
===================================================================
--- projects/haf/trunk/libmatchbox2/ChangeLog	2009-05-13 06:11:41 UTC (rev 18342)
+++ projects/haf/trunk/libmatchbox2/ChangeLog	2009-05-13 06:44:59 UTC (rev 18343)
@@ -1,3 +1,11 @@
+2009-05-13  Kimmo Hämäläinen  <kimmo.hamalainen at nokia.com>
+
+	* matchbox/core/mb-wm-client.c
+	(mb_wm_client_get_last_focused_transient): Use
+	mb_wm_stack_enumerate_reverse instead of mb_wm_stack_enumerate to
+	enumerate from the top of the stack. Makes it a bit more efficient and
+	readable.
+
 2009-05-12  Gordon Williams <gordon.williams at collabora.co.uk>
 
 	Fixes: NB#115698 - Windows not updating in some cases

Modified: projects/haf/trunk/libmatchbox2/matchbox/core/mb-wm-client.c
===================================================================
--- projects/haf/trunk/libmatchbox2/matchbox/core/mb-wm-client.c	2009-05-13 06:11:41 UTC (rev 18342)
+++ projects/haf/trunk/libmatchbox2/matchbox/core/mb-wm-client.c	2009-05-13 06:44:59 UTC (rev 18343)
@@ -623,13 +623,14 @@
 MBWindowManagerClient*
 mb_wm_client_get_last_focused_transient (MBWindowManagerClient *client)
 {
-  MBWindowManagerClient *result=NULL, *c;
+  MBWindowManagerClient *result = NULL, *c;
 
-  /* FIXME: should this be enumerate_reverse?
-   * Now it begins from the bottom? */
-  mb_wm_stack_enumerate (client->wmref, c)
-      if (c->transient_for == client)
+  mb_wm_stack_enumerate_reverse (client->wmref, c)
+    if (c->transient_for == client)
+      {
         result = c;
+        break;
+      }
 
   return result;
 }


More information about the maemo-commits mailing list