[maemo-commits] [maemo-commits] r17707 - in projects/haf/trunk/libmatchbox2: . matchbox/client-types matchbox/core

From: subversion at stage.maemo.org subversion at stage.maemo.org
Date: Tue Mar 17 13:52:57 EET 2009
Author: kihamala
Date: 2009-03-17 13:52:45 +0200 (Tue, 17 Mar 2009)
New Revision: 17707

Modified:
   projects/haf/trunk/libmatchbox2/ChangeLog
   projects/haf/trunk/libmatchbox2/matchbox/client-types/mb-wm-client-override.c
   projects/haf/trunk/libmatchbox2/matchbox/core/mb-wm-client-base.c
   projects/haf/trunk/libmatchbox2/matchbox/core/mb-wm-client-base.h
   projects/haf/trunk/libmatchbox2/matchbox/core/mb-wm-client.c
Log:
reversions!


Modified: projects/haf/trunk/libmatchbox2/ChangeLog
===================================================================
--- projects/haf/trunk/libmatchbox2/ChangeLog	2009-03-17 11:01:25 UTC (rev 17706)
+++ projects/haf/trunk/libmatchbox2/ChangeLog	2009-03-17 11:52:45 UTC (rev 17707)
@@ -1,3 +1,9 @@
+2009-03-17  Kimmo Hämäläinen  <kimmo.hamalainen at nokia.com>
+
+	* Revert Thomas' transient for handling change.
+	* Revert Adam's override stacking change and use the original,
+	commented out code instead.
+
 2009-03-17  Adam Endrodi  <adam.endrodi at blumsoft.eu>
 
 	Regression fix: stack override-redirect windows where they belong.

Modified: projects/haf/trunk/libmatchbox2/matchbox/client-types/mb-wm-client-override.c
===================================================================
--- projects/haf/trunk/libmatchbox2/matchbox/client-types/mb-wm-client-override.c	2009-03-17 11:01:25 UTC (rev 17706)
+++ projects/haf/trunk/libmatchbox2/matchbox/client-types/mb-wm-client-override.c	2009-03-17 11:52:45 UTC (rev 17707)
@@ -21,9 +21,22 @@
 #include "mb-wm-client-override.h"
 
 #include "mb-wm-theme.h"
-#include "mb-wm-client-base.h"
 
 static void
+mb_wm_client_override_stack (MBWindowManagerClient *client,
+			     int                    flags)
+{
+  MBWMList * t = mb_wm_client_get_transients (client);
+
+  mb_wm_stack_move_top(client);
+
+  mb_wm_util_list_foreach (t, (MBWMListForEachCB)mb_wm_client_stack,
+			   (void*)flags);
+
+  mb_wm_util_list_free (t);
+}
+
+static void
 mb_wm_client_override_class_init (MBWMObjectClass *klass)
 {
   MBWindowManagerClientClass *client;
@@ -32,14 +45,8 @@
 
   client = (MBWindowManagerClientClass *)klass;
 
-  /*
-   * Inherit from MB_WM_CLIENT but use MB_WM_CLIENT_BASE's stack() method
-   * for, well, stacking.  Because otherwise ->stacking_layer is ignored.
-   * In other words poor client is not stacked at all.  Which means it is
-   * left rotten at the bottom.
-   */
   client->client_type  = MBWMClientTypeOverride;
-  client->stack        = mb_wm_client_base_stack;
+  client->stack        = mb_wm_client_override_stack;
 
 #if MBWM_WANT_DEBUG
   klass->klass_name = "MBWMClientOverride";

Modified: projects/haf/trunk/libmatchbox2/matchbox/core/mb-wm-client-base.c
===================================================================
--- projects/haf/trunk/libmatchbox2/matchbox/core/mb-wm-client-base.c	2009-03-17 11:01:25 UTC (rev 17706)
+++ projects/haf/trunk/libmatchbox2/matchbox/core/mb-wm-client-base.c	2009-03-17 11:52:45 UTC (rev 17707)
@@ -36,6 +36,9 @@
 mb_wm_client_base_realize (MBWindowManagerClient *client);
 
 static void
+mb_wm_client_base_stack (MBWindowManagerClient *client,
+			 int                    flags);
+static void
 mb_wm_client_base_show (MBWindowManagerClient *client);
 
 static void
@@ -296,7 +299,7 @@
 	}
 }
 
-void
+static void
 mb_wm_client_base_stack (MBWindowManagerClient *client,
 			 int                    flags)
 {

Modified: projects/haf/trunk/libmatchbox2/matchbox/core/mb-wm-client-base.h
===================================================================
--- projects/haf/trunk/libmatchbox2/matchbox/core/mb-wm-client-base.h	2009-03-17 11:01:25 UTC (rev 17706)
+++ projects/haf/trunk/libmatchbox2/matchbox/core/mb-wm-client-base.h	2009-03-17 11:52:45 UTC (rev 17707)
@@ -48,11 +48,6 @@
 int
 mb_wm_client_base_class_type ();
 
-/* Export it for MB_WM_CLIENT_OVERRIDE. */
-void
-mb_wm_client_base_stack (MBWindowManagerClient *client,
-			 int                    flags);
-
 /** A nasty hack to work around linking issues. */
 void base_foo(void);
 

Modified: projects/haf/trunk/libmatchbox2/matchbox/core/mb-wm-client.c
===================================================================
--- projects/haf/trunk/libmatchbox2/matchbox/core/mb-wm-client.c	2009-03-17 11:01:25 UTC (rev 17706)
+++ projects/haf/trunk/libmatchbox2/matchbox/core/mb-wm-client.c	2009-03-17 11:52:45 UTC (rev 17707)
@@ -81,8 +81,12 @@
   if (client->transient_for)
     mb_wm_client_remove_transient (client->transient_for, client);
 
-  /* If we have transient windows, we need to make sure they
-   * no longer refer to this client, which is about to be destroyed.
+  /* If we have transient windows, we need to make sure they are unmapped; for
+   * application  dialogs this will happen automatically, but not for external
+   * transients, such as input windows.
+   *
+   * We also have to make sure that the transients no longer refer to this
+   * client, which is about the be destroyed.
    */
   l = client->transients;
   while (l)
@@ -91,9 +95,8 @@
       MBWMList * l2 = l;
 
       c->transient_for = NULL;
+      XUnmapWindow (wm->xdpy, c->window->xwindow);
 
-      g_warning ("Window's parent was removed; this no longer destroys the window\n");
-
       l = l->next;
 
       free (l2);


More information about the maemo-commits mailing list