+ if (pointer_grab != NULL && pointer_grab->implicit)
+ {
+ gint state = build_pointer_event_state (msg);
+
+ /* We keep the implicit grab until no buttons at all are held down */
+ if ((state & GDK_ANY_BUTTON_MASK & ~(GDK_BUTTON1_MASK << (button - 1))) == 0)
+ ReleaseCapture ();
+ }
+