--- gtk+2.0-2.10.9/gdk/x11/gdkmain-x11.corig	2007-02-13 13:57:57.000000000 +0100
+++ gtk+2.0-2.10.9/gdk/x11/gdkmain-x11.c	2007-02-13 13:57:08.000000000 +0100
@@ -533,7 +533,7 @@
     case ButtonRelease:
       if (display_x11->pointer_xgrab_window &&
 	  display_x11->pointer_xgrab_implicit &&
-	  (xevent->xbutton.state & ~(GDK_BUTTON1_MASK << (xevent->xbutton.button - 1))) == 0)
+	  (~0xff & xevent->xbutton.state & ~(GDK_BUTTON1_MASK << (xevent->xbutton.button - 1))) == 0)
 	{
 	  display_x11->pointer_xgrab_window = NULL;
 	}
