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

From: subversion at stage.maemo.org subversion at stage.maemo.org
Date: Mon May 4 12:41:06 EEST 2009
Author: aendrodi
Date: 2009-05-04 12:40:45 +0300 (Mon, 04 May 2009)
New Revision: 18212

Modified:
   projects/haf/trunk/libmatchbox2/ChangeLog
   projects/haf/trunk/libmatchbox2/matchbox/core/mb-window-manager.c
   projects/haf/trunk/libmatchbox2/matchbox/core/mb-wm-client.c
Log:
	NB#112601 An application from the background is topped when panning
		  or tapping on the right side of the touch screen

	* matchbox/core/mb-wm-client.c (mb_wm_client_init):
	  Don't set up a passive grab when a client is created...
	* matchbox/core/mb-window-manager.c (mb_wm_handle_button_press):
	  ...and don't handle all button press events.  It's thought
	  to be dead code and caused the problem because we reactivated
	  the clicked client in home view.


Modified: projects/haf/trunk/libmatchbox2/ChangeLog
===================================================================
--- projects/haf/trunk/libmatchbox2/ChangeLog	2009-05-04 08:24:59 UTC (rev 18211)
+++ projects/haf/trunk/libmatchbox2/ChangeLog	2009-05-04 09:40:45 UTC (rev 18212)
@@ -1,3 +1,15 @@
+2009-05-04  Adam Endrodi  <adam.endrodi at blumsoft.eu>
+
+	NB#112601 An application from the background is topped when panning
+		  or tapping on the right side of the touch screen
+
+	* matchbox/core/mb-wm-client.c (mb_wm_client_init):
+	  Don't set up a passive grab when a client is created...
+	* matchbox/core/mb-window-manager.c (mb_wm_handle_button_press):
+	  ...and don't handle all button press events.  It's thought
+	  to be dead code and caused the problem because we reactivated
+	  the clicked client in home view.
+
 2009-04-30  Kimmo Hämäläinen  <kimmo.hamalainen at nokia.com>
 
 	Release 0.2.36

Modified: projects/haf/trunk/libmatchbox2/matchbox/core/mb-window-manager.c
===================================================================
--- projects/haf/trunk/libmatchbox2/matchbox/core/mb-window-manager.c	2009-05-04 08:24:59 UTC (rev 18211)
+++ projects/haf/trunk/libmatchbox2/matchbox/core/mb-window-manager.c	2009-05-04 09:40:45 UTC (rev 18212)
@@ -387,44 +387,6 @@
 }
 
 static Bool
-mb_wm_handle_button_press (XButtonEvent *xev, void *userdata)
-{
-  MBWindowManager *wm = (MBWindowManager*)userdata;
-  MBWindowManagerClient *client = NULL;
-
-  if (xev->button != 1)
-    return True;
-
-  mb_wm_is_my_window (wm, xev->window, &client);
-
-  if (!client)
-    return True;
-
-  /*
-   * If the client is not application, we make sure it has focus.
-   * If the client is an application, we top it if it is currently not the top
-   * application; otherwise, we ensure it has focus.
-   */
-  if (MB_WM_CLIENT_CLIENT_TYPE (client) == MBWMClientTypeApp)
-    {
-      MBWindowManagerClient * top = mb_wm_get_visible_main_client(wm);
-
-      if (top == client)
-	mb_wm_focus_client (wm, client);
-      else
-	mb_wm_activate_client (wm, client);
-    }
-  else
-    {
-      mb_wm_focus_client (wm, client);
-    }
-
-  XAllowEvents (wm->xdpy, ReplayPointer, CurrentTime);
-
-  return True;
-}
-
-static Bool
 mb_wm_handle_destroy_notify (XDestroyWindowEvent  *xev,
 			     void                 *userdata)
 {
@@ -1704,12 +1666,6 @@
 			     (MBWMXEventFunc)mb_wm_handle_key_press,
 			     wm);
 
-  mb_wm_main_context_x_event_handler_add (wm->main_ctx,
-			     None,
-			     ButtonPress,
-			     (MBWMXEventFunc)mb_wm_handle_button_press,
-			     wm);
-
   mb_wm_keys_init(wm);
 
   /* set the cursor invisible */

Modified: projects/haf/trunk/libmatchbox2/matchbox/core/mb-wm-client.c
===================================================================
--- projects/haf/trunk/libmatchbox2/matchbox/core/mb-wm-client.c	2009-05-04 08:24:59 UTC (rev 18211)
+++ projects/haf/trunk/libmatchbox2/matchbox/core/mb-wm-client.c	2009-05-04 09:40:45 UTC (rev 18212)
@@ -124,7 +124,6 @@
   MBWindowManager       *wm = NULL;
   MBWMClientWindow      *win = NULL;
   MBWMObjectProp         prop;
-  int                    status;
 
   prop = va_arg(vap, MBWMObjectProp);
   while (prop)
@@ -178,14 +177,6 @@
 		 (MBWMObjectCallbackFunc)mb_wm_client_on_theme_change,
 		 client);
 
-  status = XGrabButton(wm->xdpy, Button1, 0, win->xwindow, True,
-		       ButtonPressMask,
-		       GrabModeSync, GrabModeSync, None, None);
-
-  MBWM_NOTE (CLIENT, "XGrabButton() returned status %d for client window %x",
-	     status,
-	     win->xwindow);
-
 #if ENABLE_COMPOSITE
   {
     XRenderPictFormat *format;


More information about the maemo-commits mailing list