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

From: subversion at stage.maemo.org subversion at stage.maemo.org
Date: Thu Jun 4 05:02:45 EEST 2009
Author: tthurman
Date: 2009-06-04 05:02:33 +0300 (Thu, 04 Jun 2009)
New Revision: 18603

Modified:
   projects/haf/trunk/libmatchbox2/ChangeLog
   projects/haf/trunk/libmatchbox2/matchbox/core/mb-wm-client.c
   projects/haf/trunk/libmatchbox2/matchbox/core/mb-wm-client.h
Log:
	* matchbox/core/mb-wm-client.[ch]: add new function
	mb_wm_client_get_next_focused_app() to return the app next above
	a given client in the focus order.



Modified: projects/haf/trunk/libmatchbox2/ChangeLog
===================================================================
--- projects/haf/trunk/libmatchbox2/ChangeLog	2009-06-03 21:03:17 UTC (rev 18602)
+++ projects/haf/trunk/libmatchbox2/ChangeLog	2009-06-04 02:02:33 UTC (rev 18603)
@@ -1,5 +1,11 @@
 2009-06-03  Thomas Thurman  <thomas.thurman at collabora.co.uk>
 
+	* matchbox/core/mb-wm-client.[ch]: add new function
+	mb_wm_client_get_next_focused_app() to return the app next above
+	a given client in the focus order.
+
+2009-06-03  Thomas Thurman  <thomas.thurman at collabora.co.uk>
+
 	* matchbox/theme-engines/mb-wm-theme-png.c: avoid warning about
 	unused result of fread().
 

Modified: projects/haf/trunk/libmatchbox2/matchbox/core/mb-wm-client.c
===================================================================
--- projects/haf/trunk/libmatchbox2/matchbox/core/mb-wm-client.c	2009-06-03 21:03:17 UTC (rev 18602)
+++ projects/haf/trunk/libmatchbox2/matchbox/core/mb-wm-client.c	2009-06-04 02:02:33 UTC (rev 18603)
@@ -609,6 +609,23 @@
 }
 
 /**
+ * Returns the app next above the given client in the
+ * stacking order.  Returns NULL if there is no app
+ * higher than this client.
+ */
+MBWindowManagerClient*
+mb_wm_client_get_next_focused_app (MBWindowManagerClient *client)
+{
+  while (client)
+    {
+      client = client->stacked_above;
+      if (client && MB_WM_CLIENT_CLIENT_TYPE (client)==MBWMClientTypeApp)
+	return client;
+    }
+  return NULL;
+}
+
+/**
  * Returns the transient of client "client" which was most recently
  * focused (i.e. which is closest to the top, in our model).
  * Returns NULL if there are no transients for the given client.

Modified: projects/haf/trunk/libmatchbox2/matchbox/core/mb-wm-client.h
===================================================================
--- projects/haf/trunk/libmatchbox2/matchbox/core/mb-wm-client.h	2009-06-03 21:03:17 UTC (rev 18602)
+++ projects/haf/trunk/libmatchbox2/matchbox/core/mb-wm-client.h	2009-06-04 02:02:33 UTC (rev 18603)
@@ -325,6 +325,9 @@
 mb_wm_client_get_next_focused_client (MBWindowManagerClient *client);
 
 MBWindowManagerClient*
+mb_wm_client_get_next_focused_app (MBWindowManagerClient *client);
+
+MBWindowManagerClient*
 mb_wm_client_get_last_focused_transient (MBWindowManagerClient *client);
 
 MBWMList*


More information about the maemo-commits mailing list