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

From: subversion at stage.maemo.org subversion at stage.maemo.org
Date: Tue Aug 11 17:01:58 EEST 2009
Author: gw
Date: 2009-08-11 17:01:52 +0300 (Tue, 11 Aug 2009)
New Revision: 19121

Modified:
   projects/haf/trunk/libmatchbox2/ChangeLog
   projects/haf/trunk/libmatchbox2/matchbox/core/mb-wm-client-window.c
Log:
	* matchbox/core/mb-wm-client-window.c: Removed the Monster Hack again,
	  but only for the desktop window. This solves the regressed fix for
	  desktop panning not working when panning from the very right hand 
	  side of the screen (desktop was 799x479, so never got ButtonPress
	  when X==799).


Modified: projects/haf/trunk/libmatchbox2/ChangeLog
===================================================================
--- projects/haf/trunk/libmatchbox2/ChangeLog	2009-08-11 13:10:53 UTC (rev 19120)
+++ projects/haf/trunk/libmatchbox2/ChangeLog	2009-08-11 14:01:52 UTC (rev 19121)
@@ -1,3 +1,11 @@
+2009-08-11  Gordon Williams <gordon.williams at collabora.co.uk>
+
+	* matchbox/core/mb-wm-client-window.c: Removed the Monster Hack again,
+	  but only for the desktop window. This solves the regressed fix for
+	  desktop panning not working when panning from the very right hand 
+	  side of the screen (desktop was 799x479, so never got ButtonPress
+	  when X==799).
+
 2009-08-11  Kimmo Hämäläinen  <kimmo.hamalainen at nokia.com>
 
 	Release 0.2.56

Modified: projects/haf/trunk/libmatchbox2/matchbox/core/mb-wm-client-window.c
===================================================================
--- projects/haf/trunk/libmatchbox2/matchbox/core/mb-wm-client-window.c	2009-08-11 13:10:53 UTC (rev 19120)
+++ projects/haf/trunk/libmatchbox2/matchbox/core/mb-wm-client-window.c	2009-08-11 14:01:52 UTC (rev 19121)
@@ -651,11 +651,20 @@
        *
        * Seeing all the complexity we must conclude that whoever conceived
        * the monster hack must have been a genius.
+       *
+       * ... adding to this, we have a slight problem where the desktop
+       * doesn't recieve a button-pressed event (for panning) if we press
+       * *right* on the right-hand side of the screen (because it is only 799
+       * pixels wide). Hence we'll avoid the monster hack for desktop windows.
        */
-      if (win->x_geometry.width >= wm->xdpy_width)
-	      win->x_geometry.width = wm->xdpy_width - 1;
-      if (win->x_geometry.height >= wm->xdpy_height)
-	      win->x_geometry.height = wm->xdpy_height - 1;
+      if (win->net_type !=
+          wm->atoms[MBWM_ATOM_NET_WM_WINDOW_TYPE_DESKTOP])
+        {
+          if (win->x_geometry.width >= wm->xdpy_width)
+                  win->x_geometry.width = wm->xdpy_width - 1;
+          if (win->x_geometry.height >= wm->xdpy_height)
+                  win->x_geometry.height = wm->xdpy_height - 1;
+        }
 
       MBWM_DBG("@@@ New Window Obj @@@");
       MBWM_DBG("Win:  %lx", win->xwindow);

More information about the maemo-commits mailing list