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

From: subversion at stage.maemo.org subversion at stage.maemo.org
Date: Wed Apr 1 16:12:34 EEST 2009
Author: gw
Date: 2009-04-01 16:12:20 +0300 (Wed, 01 Apr 2009)
New Revision: 17959

Modified:
   projects/haf/trunk/libmatchbox2/ChangeLog
   projects/haf/trunk/libmatchbox2/matchbox/core/mb-wm-main-context.c
Log:
	* matchbox/core/mb-wm-main-context.c (call_handlers_for_event):
	Fix for the case where a handler is removed from the handlers list
	while it is being called.


Modified: projects/haf/trunk/libmatchbox2/ChangeLog
===================================================================
--- projects/haf/trunk/libmatchbox2/ChangeLog	2009-04-01 12:54:24 UTC (rev 17958)
+++ projects/haf/trunk/libmatchbox2/ChangeLog	2009-04-01 13:12:20 UTC (rev 17959)
@@ -1,3 +1,9 @@
+2009-04-01  Gordon Williams  <gordon.williams at collabora.co.uk>
+
+	* matchbox/core/mb-wm-main-context.c (call_handlers_for_event):
+	Fix for the case where a handler is removed from the handlers list
+	while it is being called.
+
 2009-04-01  Kimmo Hämäläinen  <kimmo.hamalainen at nokia.com>
 
 	* matchbox/core/mb-wm-client-window.c

Modified: projects/haf/trunk/libmatchbox2/matchbox/core/mb-wm-main-context.c
===================================================================
--- projects/haf/trunk/libmatchbox2/matchbox/core/mb-wm-main-context.c	2009-04-01 12:54:24 UTC (rev 17958)
+++ projects/haf/trunk/libmatchbox2/matchbox/core/mb-wm-main-context.c	2009-04-01 13:12:20 UTC (rev 17959)
@@ -178,6 +178,7 @@
   while (iter)
     {
       MBWMXEventFuncInfo *i = iter->data;
+      MBWMList        *next = iter->next;
 
       if (i && (i->xwindow == None || i->xwindow == xwin))
 	{
@@ -187,13 +188,13 @@
 	       * But only warn about this if it's not the last
 	       * handler in the chain!
 	       */
-	      if (iter->next)
+	      if (next)
 		g_warning ("Handler %p asked us to stop.  But we won't.",
 			   i->func);
 	    }
 	}
 
-      iter = iter->next;
+      iter = next;
     }
 }
 
@@ -209,7 +210,7 @@
   if (mbwm_debug_flags & MBWM_DEBUG_EVENT)
     {
       MBWindowManagerClient *ev_client;
-      
+
       ev_client = mb_wm_managed_client_from_xwindow(wm, xev->xany.window);
 
       printf ("  @ XEvent: '%s:%i' for %lx %s%s\n",
@@ -264,7 +265,7 @@
 		    pev->window,
 		    prop,
 		    pev->state);
-	    
+
 	    if (prop)
 	      XFree (prop);
 	  }


More information about the maemo-commits mailing list