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

From: subversion at stage.maemo.org subversion at stage.maemo.org
Date: Fri Feb 13 17:05:15 EET 2009
Author: kihamala
Date: 2009-02-13 17:05:13 +0200 (Fri, 13 Feb 2009)
New Revision: 17422

Modified:
   projects/haf/trunk/libmatchbox2/ChangeLog
   projects/haf/trunk/libmatchbox2/debian/changelog
   projects/haf/trunk/libmatchbox2/matchbox/client-types/mb-wm-client-dialog.c
Log:
respect undecorated flag for dialogs


Modified: projects/haf/trunk/libmatchbox2/ChangeLog
===================================================================
--- projects/haf/trunk/libmatchbox2/ChangeLog	2009-02-13 13:46:34 UTC (rev 17421)
+++ projects/haf/trunk/libmatchbox2/ChangeLog	2009-02-13 15:05:13 UTC (rev 17422)
@@ -1,5 +1,11 @@
 2009-02-13  Kimmo Hämäläinen  <kimmo.hamalainen at nokia.com>
 
+	* matchbox/client-types/mb-wm-client-dialog.c
+	(mb_wm_client_dialog_init): Respect the undecorated flag when
+	determining the size of the dialog.
+
+2009-02-13  Kimmo Hämäläinen  <kimmo.hamalainen at nokia.com>
+
 	Release 0.2.17
 
 2009-02-13  Gordon Williams  <gordon.williams at collabora.co.uk>

Modified: projects/haf/trunk/libmatchbox2/debian/changelog
===================================================================
--- projects/haf/trunk/libmatchbox2/debian/changelog	2009-02-13 13:46:34 UTC (rev 17421)
+++ projects/haf/trunk/libmatchbox2/debian/changelog	2009-02-13 15:05:13 UTC (rev 17422)
@@ -1,3 +1,9 @@
+matchbox-window-manager-2 (0.2.18-1~unreleased) unstable; urgency=low
+
+  * Respect undecorated flag for dialogs.
+
+ -- Kimmo Hämäläinen <kimmo.hamalainen at nokia.com>  Fri, 13 Feb 2009 17:00:38 +0200
+
 matchbox-window-manager-2 (0.2.17-1) unstable; urgency=low
 
   * Fixes for several Coverity-found issues.

Modified: projects/haf/trunk/libmatchbox2/matchbox/client-types/mb-wm-client-dialog.c
===================================================================
--- projects/haf/trunk/libmatchbox2/matchbox/client-types/mb-wm-client-dialog.c	2009-02-13 13:46:34 UTC (rev 17421)
+++ projects/haf/trunk/libmatchbox2/matchbox/client-types/mb-wm-client-dialog.c	2009-02-13 15:05:13 UTC (rev 17422)
@@ -90,7 +90,6 @@
   MBWindowManager       *wm = client->wmref;
   MBWMClientWindow      *win = client->window;
   MBGeometry             geom;
-  int                    n, s, w, e;
   Atom actions[] = {
     wm->atoms[MBWM_ATOM_NET_WM_ACTION_CLOSE],
     wm->atoms[MBWM_ATOM_NET_WM_ACTION_MOVE],
@@ -108,7 +107,7 @@
 				 LayoutPrefMovable      |
 				 LayoutPrefVisible);
 
-  if (!client->window->undecorated)
+  if (!client->window->undecorated && wm->theme)
     {
       mb_wm_theme_create_decor (wm->theme, client, MBWMDecorTypeNorth);
       mb_wm_theme_create_decor (wm->theme, client, MBWMDecorTypeSouth);
@@ -166,13 +165,26 @@
    * geometry from the layout manager -- we have to set the initial geometry
    * here
    */
-  mb_wm_theme_get_decor_dimensions (wm->theme, client, &n, &s, &w, &e);
+  if (client->window->undecorated)
+    {
+      geom.x      = client->window->geometry.x;
+      geom.y      = client->window->geometry.y;
+      geom.width  = client->window->geometry.width;
+      geom.height = client->window->geometry.height;
+    }
+  else
+    {
+      int n, s, w, e;
+      n = s = w = e = 0;
 
-  geom.x      = client->window->geometry.x;
-  geom.y      = client->window->geometry.y;
-  geom.width  = client->window->geometry.width + w + e;
-  geom.height = client->window->geometry.height + n + s;
+      mb_wm_theme_get_decor_dimensions (wm->theme, client, &n, &s, &w, &e);
 
+      geom.x      = client->window->geometry.x;
+      geom.y      = client->window->geometry.y;
+      geom.width  = client->window->geometry.width + w + e;
+      geom.height = client->window->geometry.height + n + s;
+    }
+
   mb_wm_client_dialog_request_geometry (client, &geom,
 					MBWMClientReqGeomForced);
 
@@ -228,7 +240,7 @@
       int north = 0, south = 0, west = 0, east = 0;
       MBWindowManager *wm = client->wmref;
 
-      if (client->decor)
+      if (!client->window->undecorated && client->decor)
 	mb_wm_theme_get_decor_dimensions (wm->theme, client,
 					  &north, &south, &west, &east);
 


More information about the maemo-commits mailing list