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

From: subversion at stage.maemo.org subversion at stage.maemo.org
Date: Wed Mar 18 21:58:13 EET 2009
Author: tthurman
Date: 2009-03-18 21:58:09 +0200 (Wed, 18 Mar 2009)
New Revision: 17735

Modified:
   projects/haf/trunk/libmatchbox2/ChangeLog
   projects/haf/trunk/libmatchbox2/matchbox/core/mb-wm-client-window.c
Log:
	Fixes: NB#103836 (or at least its test case).
	* matchbox/core/mb-wm-client-window.c: When we're told that
	a window's transiency has changed, update the information
	in the client window structure if the window is mapped.



Modified: projects/haf/trunk/libmatchbox2/ChangeLog
===================================================================
--- projects/haf/trunk/libmatchbox2/ChangeLog	2009-03-18 18:06:50 UTC (rev 17734)
+++ projects/haf/trunk/libmatchbox2/ChangeLog	2009-03-18 19:58:09 UTC (rev 17735)
@@ -1,3 +1,11 @@
+2009-03-18  Thomas Thurman  <thomas.thurman at collabora.co.uk>
+
+	Fixes: NB#103836 (or at least its test case).
+	
+	* matchbox/core/mb-wm-client-window.c: When we're told that
+	a window's transiency has changed, update the information
+	in the client window structure if the window is mapped.
+
 2009-03-18  Kimmo Hämäläinen  <kimmo.hamalainen at nokia.com>
 
 	* matchbox/core/mb-wm-client-base.[ch] (base_foo): Removed, does

Modified: projects/haf/trunk/libmatchbox2/matchbox/core/mb-wm-client-window.c
===================================================================
--- projects/haf/trunk/libmatchbox2/matchbox/core/mb-wm-client-window.c	2009-03-18 18:06:50 UTC (rev 17734)
+++ projects/haf/trunk/libmatchbox2/matchbox/core/mb-wm-client-window.c	2009-03-18 19:58:09 UTC (rev 17735)
@@ -374,9 +374,34 @@
 	  MBWM_DBG("@@@ Window transient for %lx @@@", *trans_win);
 
 	  if (*trans_win != win->xwin_transient_for)
-	    changes |= MBWM_WINDOW_PROP_TRANSIENCY;
+	    {
+	      MBWindowManagerClient *new_parent =
+		mb_wm_managed_client_from_xwindow (wm, *trans_win);
 
-	  win->xwin_transient_for = *trans_win;
+	      changes |= MBWM_WINDOW_PROP_TRANSIENCY;
+
+	      if (!new_parent)
+		{
+		  g_warning ("Window %07x attempted to become transient to %07x "
+			     "which isn't a real window; ignoring",
+			     (int) win->xwindow, *trans_win);
+		}
+	      else
+		{
+		  MBWindowManagerClient *child =
+		    mb_wm_managed_client_from_xwindow (wm, win->xwindow);
+
+		  win->xwin_transient_for = *trans_win;
+
+		  if (child)
+		    {
+		      /* it's already mapped */
+		      mb_wm_client_remove_transient (child->transient_for, child);
+		      mb_wm_client_add_transient (new_parent, child);
+		    }
+		}
+	    }
+
 	  XFree(trans_win);
 	}
       else MBWM_DBG("@@@ Window transient for nothing @@@");


More information about the maemo-commits mailing list