[maemo-commits] [maemo-commits] r18951 - in projects/haf/trunk/libmatchbox2: . debian matchbox/comp-mgr matchbox/core

From: subversion at stage.maemo.org subversion at stage.maemo.org
Date: Wed Jul 22 16:34:07 EEST 2009
Author: gw
Date: 2009-07-22 16:34:04 +0300 (Wed, 22 Jul 2009)
New Revision: 18951

Modified:
   projects/haf/trunk/libmatchbox2/ChangeLog
   projects/haf/trunk/libmatchbox2/debian/control
   projects/haf/trunk/libmatchbox2/matchbox/comp-mgr/mb-wm-comp-mgr-clutter.c
   projects/haf/trunk/libmatchbox2/matchbox/core/mb-wm-client.c
Log:
	Changes to help with RGBA sapwood - disable alpha (transparency) 
	channel for apps and dialogs.

	* matchbox/comp-mgr/mb-wm-comp-mgr-clutter.c: Use set_allow_alpha
	  to disable alpha if libmatchbox doesn't believe the window has
	  alpha. 
	* matchbox/core/mb-wm-client.c: Intentionally don't allow transparency
	  for apps or dialogs.
	* debian/control: make dependent on the new clutter


Modified: projects/haf/trunk/libmatchbox2/ChangeLog
===================================================================
--- projects/haf/trunk/libmatchbox2/ChangeLog	2009-07-22 13:27:06 UTC (rev 18950)
+++ projects/haf/trunk/libmatchbox2/ChangeLog	2009-07-22 13:34:04 UTC (rev 18951)
@@ -1,3 +1,15 @@
+2009-07-22  Gordon Williams <gordon.williams at collabora.co.uk>
+
+	Changes to help with RGBA sapwood - disable alpha (transparency) 
+	channel for apps and dialogs.
+
+	* matchbox/comp-mgr/mb-wm-comp-mgr-clutter.c: Use set_allow_alpha
+	  to disable alpha if libmatchbox doesn't believe the window has
+	  alpha. 
+	* matchbox/core/mb-wm-client.c: Intentionally don't allow transparency
+	  for apps or dialogs.
+	* debian/control: make dependent on the new clutter
+
 2009-07-22  Kimmo Hämäläinen  <kimmo.hamalainen at nokia.com>
 
 	Release 0.2.49

Modified: projects/haf/trunk/libmatchbox2/debian/control
===================================================================
--- projects/haf/trunk/libmatchbox2/debian/control	2009-07-22 13:27:06 UTC (rev 18950)
+++ projects/haf/trunk/libmatchbox2/debian/control	2009-07-22 13:34:04 UTC (rev 18951)
@@ -2,7 +2,7 @@
 Section: libs
 Priority: optional
 Maintainer: Kimmo Hämäläinen <kimmo.hamalainen at nokia.com>
-Build-Depends: cdbs (>= 0.4.21), debhelper (>= 4.1.0), pkg-config (>= 0.18), libx11-dev, x11proto-core-dev, libxext-dev, libxt-dev, libglib2.0-dev, libpng12-dev, libpango1.0-dev, libxcomposite-dev, libxdamage-dev, libclutter-0.8-dev (>> 0.8.2-0maemo34)
+Build-Depends: cdbs (>= 0.4.21), debhelper (>= 4.1.0), pkg-config (>= 0.18), libx11-dev, x11proto-core-dev, libxext-dev, libxt-dev, libglib2.0-dev, libpng12-dev, libpango1.0-dev, libxcomposite-dev, libxdamage-dev, libclutter-0.8-dev (>> 0.8.2-0maemo40)
 Standards-Version: 3.8.0
 
 Package: libmatchbox2-dev

Modified: projects/haf/trunk/libmatchbox2/matchbox/comp-mgr/mb-wm-comp-mgr-clutter.c
===================================================================
--- projects/haf/trunk/libmatchbox2/matchbox/comp-mgr/mb-wm-comp-mgr-clutter.c	2009-07-22 13:27:06 UTC (rev 18950)
+++ projects/haf/trunk/libmatchbox2/matchbox/comp-mgr/mb-wm-comp-mgr-clutter.c	2009-07-22 13:34:04 UTC (rev 18951)
@@ -1051,7 +1051,7 @@
       cclient->priv->window_damage = 0;
 
       if (cclient->priv->texture)
-        /* release the window in Clutter */ 
+        /* release the window in Clutter */
         clutter_x11_texture_pixmap_set_window (
                 CLUTTER_X11_TEXTURE_PIXMAP (cclient->priv->texture),
                 0, FALSE);
@@ -1133,6 +1133,10 @@
   texture = clutter_x11_texture_pixmap_new ();
 #endif
 
+  /* If the window isn't ARGB32, make sure we don't allow alpha */
+  if (!c->is_argb32)
+    clutter_x11_texture_pixmap_set_allow_alpha(
+        CLUTTER_X11_TEXTURE_PIXMAP(texture), FALSE);
 
   sprintf(actor_name, "texture_0x%lx",
           c->xwin_frame ? c->xwin_frame : c->window->xwindow);

Modified: projects/haf/trunk/libmatchbox2/matchbox/core/mb-wm-client.c
===================================================================
--- projects/haf/trunk/libmatchbox2/matchbox/core/mb-wm-client.c	2009-07-22 13:27:06 UTC (rev 18950)
+++ projects/haf/trunk/libmatchbox2/matchbox/core/mb-wm-client.c	2009-07-22 13:34:04 UTC (rev 18951)
@@ -176,7 +176,10 @@
     if (format && format->type == PictTypeDirect &&
 	format->direct.alphaMask)
       {
-	client->is_argb32 = True;
+        MBWMClientType ctype = MB_WM_CLIENT_CLIENT_TYPE (client);
+        if (ctype != MBWMClientTypeApp &&
+            ctype != MBWMClientTypeDialog)
+          client->is_argb32 = True;
       }
   }
 #endif
@@ -586,7 +589,7 @@
    * If this transient already has a registered transient parent we need to
    * remove the link from the parent.
    */
-  if (transient->transient_for) 
+  if (transient->transient_for)
     mb_wm_client_remove_transient (transient->transient_for, transient);
 
   transient->transient_for = client;
@@ -972,7 +975,7 @@
       break;
     }
 
-  if (new_state == old_state) 
+  if (new_state == old_state)
     return;
 
   if (new_state)
@@ -1211,7 +1214,7 @@
   MBWindowManager *wm = client->wmref;
 
   mb_wm_client_get_coverage (client, &geometry);
-  
+
   return
     mb_wm_client_is_mapped (client) &&
     !mb_wm_client_is_hiding_from_desktop (client) &&
@@ -1241,7 +1244,7 @@
 
   return
     geometry.x <= 0 &&
-    geometry.y <= 0 &&    
+    geometry.y <= 0 &&
     right >= right_of_screen &&
     bottom >= bottom_of_screen;
 }

More information about the maemo-commits mailing list