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

From: subversion at stage.maemo.org subversion at stage.maemo.org
Date: Mon May 4 18:33:23 EEST 2009
Author: kihamala
Date: 2009-05-04 18:33:12 +0300 (Mon, 04 May 2009)
New Revision: 18232

Modified:
   projects/haf/trunk/libmatchbox2/ChangeLog
   projects/haf/trunk/libmatchbox2/debian/changelog
   projects/haf/trunk/libmatchbox2/matchbox/client-types/mb-wm-client-app.c
   projects/haf/trunk/libmatchbox2/matchbox/client-types/mb-wm-client-app.h
   projects/haf/trunk/libmatchbox2/matchbox/client-types/mb-wm-client-dialog.h
   projects/haf/trunk/libmatchbox2/matchbox/core/mb-wm-client-base.c
   projects/haf/trunk/libmatchbox2/matchbox/core/mb-wm-client-window.c
   projects/haf/trunk/libmatchbox2/matchbox/core/mb-wm-object.h
Log:
re-apply Laszlo


Modified: projects/haf/trunk/libmatchbox2/ChangeLog
===================================================================
--- projects/haf/trunk/libmatchbox2/ChangeLog	2009-05-04 15:00:28 UTC (rev 18231)
+++ projects/haf/trunk/libmatchbox2/ChangeLog	2009-05-04 15:33:12 UTC (rev 18232)
@@ -1,3 +1,17 @@
+2009-05-04  Kimmo Hämäläinen  <kimmo.hamalainen at nokia.com>
+
+	Applied two patches from Laszlo Pere for NB#110527 and NB#106208.
+
+	* matchbox/core/mb-wm-client-window.c (mb_wm_client_window_init): Call
+	XSelectInput here instead of in matchbox/core/mb-wm-client-base.c
+	(mb_wm_client_base_realize), except for override-redirect windows.
+	* matchbox/client-types/mb-wm-client-app.c,
+	matchbox/client-types/mb-wm-client-app.h,
+	matchbox/client-types/mb-wm-client-dialog.h,
+	matchbox/core/mb-wm-object.h: If parent MBWMClientApp is mapped after
+	the child (in transiency sense), set the transiency in
+	mb_wm_client_app_init.
+
 2009-05-04  Adam Endrodi  <adam.endrodi at blumsoft.eu>
 
 	NB#112601 An application from the background is topped when panning

Modified: projects/haf/trunk/libmatchbox2/debian/changelog
===================================================================
--- projects/haf/trunk/libmatchbox2/debian/changelog	2009-05-04 15:00:28 UTC (rev 18231)
+++ projects/haf/trunk/libmatchbox2/debian/changelog	2009-05-04 15:33:12 UTC (rev 18232)
@@ -1,7 +1,14 @@
 matchbox-window-manager-2 (0.2.37-1~unreleased) unstable; urgency=low
 
-  * writeme
+  Laszlo:
+  * Fixes: NB#110527 - Adding two window to stack using
+    hildon_window_stack_push, topmost window is black
+  * Fixes: NB#106208 - Wrong window shown after pushing 2 windows
 
+  Adam:
+  * Fixes: NB#112601 - An application from the background is topped when
+    panning or tapping on the right side of the touch screen
+
  -- Kimmo Hämäläinen <kimmo.hamalainen at nokia.com>  Thu, 30 Apr 2009 14:47:01 +0300
 
 matchbox-window-manager-2 (0.2.36-1) unstable; urgency=low

Modified: projects/haf/trunk/libmatchbox2/matchbox/client-types/mb-wm-client-app.c
===================================================================
--- projects/haf/trunk/libmatchbox2/matchbox/client-types/mb-wm-client-app.c	2009-05-04 15:00:28 UTC (rev 18231)
+++ projects/haf/trunk/libmatchbox2/matchbox/client-types/mb-wm-client-app.c	2009-05-04 15:33:12 UTC (rev 18232)
@@ -1,4 +1,8 @@
 #include "mb-wm-client-app.h"
+#include "mb-wm-client-dialog.h"
+#include "mb-wm-client-menu.h"
+#include "mb-wm-client-override.h"
+#include "mb-wm-client-input.h"
 
 #include "mb-wm-theme.h"
 
@@ -99,6 +103,29 @@
       mb_wm_theme_create_decor (wm->theme, client, MBWMDecorTypeEast);
     }
 
+  /*
+   * The transient parent might be mapped after the client is mapped so we go
+   * back and if we find the client we register the transient parent now.
+   */
+  MBWMList *l = wm->clients;
+  MBWindowManagerClient *c;
+  while (l)
+    {
+       c = l->data;
+       if (c->window->xwin_transient_for &&
+           client->window->xwindow == c->window->xwin_transient_for &&
+           (MB_WM_IS_CLIENT_APP(c) || MB_WM_PARENT_IS_CLIENT_APP(c) ||
+            MB_WM_IS_CLIENT_DIALOG(c) || MB_WM_PARENT_IS_CLIENT_DIALOG(c) ||
+            MB_WM_IS_CLIENT_MENU(c) ||
+            MB_WM_IS_CLIENT_OVERRIDE(c) ||
+            MB_WM_IS_CLIENT_INPUT(c))) {
+         mb_wm_client_add_transient (client, c);
+         c->stacking_layer = client->stacking_layer;
+       }
+       
+       l = l->next;
+    }
+
   return 1;
 }
 

Modified: projects/haf/trunk/libmatchbox2/matchbox/client-types/mb-wm-client-app.h
===================================================================
--- projects/haf/trunk/libmatchbox2/matchbox/client-types/mb-wm-client-app.h	2009-05-04 15:00:28 UTC (rev 18231)
+++ projects/haf/trunk/libmatchbox2/matchbox/client-types/mb-wm-client-app.h	2009-05-04 15:33:12 UTC (rev 18232)
@@ -30,6 +30,7 @@
 #define MB_WM_CLIENT_APP_CLASS(c) ((MBWMClientAppClass*)(c))
 #define MB_WM_TYPE_CLIENT_APP (mb_wm_client_app_class_type ())
 #define MB_WM_IS_CLIENT_APP(c) (MB_WM_OBJECT_TYPE(c)==MB_WM_TYPE_CLIENT_APP)
+#define MB_WM_PARENT_IS_CLIENT_APP(c) (MB_WM_OBJECT_PARENT_TYPE(c)==MB_WM_TYPE_CLIENT_APP)
 
 /**
  * A MBWMClientBase for applications: that is, those whose type is

Modified: projects/haf/trunk/libmatchbox2/matchbox/client-types/mb-wm-client-dialog.h
===================================================================
--- projects/haf/trunk/libmatchbox2/matchbox/client-types/mb-wm-client-dialog.h	2009-05-04 15:00:28 UTC (rev 18231)
+++ projects/haf/trunk/libmatchbox2/matchbox/client-types/mb-wm-client-dialog.h	2009-05-04 15:33:12 UTC (rev 18232)
@@ -30,6 +30,7 @@
 #define MB_WM_CLIENT_DIALOG_CLASS(c) ((MBWMClientDialogClass*)(c))
 #define MB_WM_TYPE_CLIENT_DIALOG (mb_wm_client_dialog_class_type ())
 #define MB_WM_IS_CLIENT_DIALOG(c) (MB_WM_OBJECT_TYPE(c)==MB_WM_TYPE_CLIENT_DIALOG)
+#define MB_WM_PARENT_IS_CLIENT_DIALOG(c) (MB_WM_OBJECT_PARENT_TYPE(c)==MB_WM_TYPE_CLIENT_DIALOG)
 
 /**
  * A MBWMClientBase for dialogue windows: that is, those whose type is

Modified: projects/haf/trunk/libmatchbox2/matchbox/core/mb-wm-client-base.c
===================================================================
--- projects/haf/trunk/libmatchbox2/matchbox/core/mb-wm-client-base.c	2009-05-04 15:00:28 UTC (rev 18231)
+++ projects/haf/trunk/libmatchbox2/matchbox/core/mb-wm-client-base.c	2009-05-04 15:33:12 UTC (rev 18232)
@@ -276,10 +276,6 @@
   XSetWindowBorderWidth(wm->xdpy, MB_WM_CLIENT_XWIN(client), 0);
 
   XAddToSaveSet(wm->xdpy, MB_WM_CLIENT_XWIN(client));
-
-  XSelectInput(wm->xdpy,
-	       MB_WM_CLIENT_XWIN(client),
-	       PropertyChangeMask);
 }
 
 /*

Modified: projects/haf/trunk/libmatchbox2/matchbox/core/mb-wm-client-window.c
===================================================================
--- projects/haf/trunk/libmatchbox2/matchbox/core/mb-wm-client-window.c	2009-05-04 15:00:28 UTC (rev 18231)
+++ projects/haf/trunk/libmatchbox2/matchbox/core/mb-wm-client-window.c	2009-05-04 15:33:12 UTC (rev 18232)
@@ -125,6 +125,20 @@
   win->xwindow = xwin;
   win->wm = wm;
 
+  /*
+   * We need to call XSelectInput() early so we are going to be notified about
+   * the WM_TRANSIENT_FOR changes. However we don't want to XSelectInput() for
+   * override redirect windows, so we need to know if the window is an override
+   * redirect window before calling XSelectInput(). To avoid race condition we
+   * also need to call the XSelectInput() before reading the current transient
+   * parent settings.
+   */
+  mb_wm_client_window_sync_properties (win, MBWM_WINDOW_PROP_ATTR);
+  if (!win->override_redirect) 
+    XSelectInput(wm->xdpy,
+	       xwin,
+	       PropertyChangeMask);
+
   /* TODO: handle properties after discovering them. E.g. fullscreen.
    * See NB#97342 */
   return mb_wm_client_window_sync_properties (win, MBWM_WINDOW_PROP_ALL);

Modified: projects/haf/trunk/libmatchbox2/matchbox/core/mb-wm-object.h
===================================================================
--- projects/haf/trunk/libmatchbox2/matchbox/core/mb-wm-object.h	2009-05-04 15:00:28 UTC (rev 18231)
+++ projects/haf/trunk/libmatchbox2/matchbox/core/mb-wm-object.h	2009-05-04 15:33:12 UTC (rev 18232)
@@ -38,6 +38,7 @@
 #define MB_WM_OBJECT_GET_CLASS(x) (mb_wm_object_get_class (MB_WM_OBJECT(x)))
 #define MB_WM_OBJECT_GET_PARENT_CLASS(x) \
     ((mb_wm_object_get_class (MB_WM_OBJECT(x)))->parent)
+#define MB_WM_OBJECT_PARENT_TYPE(x) (MB_WM_OBJECT_GET_PARENT_CLASS(x)->type)
 
 typedef enum  MBWMObjectClassType
 {


More information about the maemo-commits mailing list