summaryrefslogtreecommitdiff
path: root/src/frames.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/frames.c')
-rw-r--r--src/frames.c26
1 files changed, 16 insertions, 10 deletions
diff --git a/src/frames.c b/src/frames.c
index 8d23ccf..6cefbd8 100644
--- a/src/frames.c
+++ b/src/frames.c
@@ -719,29 +719,35 @@ meta_frames_manage_window (MetaFrames *frames,
while (i < 4)
{
int result;
-
- result = XGrabButton (gdk_display, i, Mod1Mask,
- xwindow, False,
- ButtonPressMask | ButtonReleaseMask |
- PointerMotionMask | PointerMotionHintMask,
- GrabModeAsync, GrabModeAsync,
- False, None);
+
+ gdk_error_trap_push ();
+ XGrabButton (gdk_display, i, Mod1Mask,
+ xwindow, False,
+ ButtonPressMask | ButtonReleaseMask |
+ PointerMotionMask | PointerMotionHintMask,
+ GrabModeAsync, GrabModeAsync,
+ False, None);
+ XSync (gdk_display, False);
+ result = gdk_error_trap_pop ();
if (result != Success)
meta_warning ("Failed to grab button %d with Mod1Mask for frame 0x%lx error code %d\n",
i, xwindow, result);
-
-#if 0
+
+#if 1
/* This is just for debugging, since I end up moving
* the Xnest otherwise ;-)
*/
+ gdk_error_trap_push ();
result = XGrabButton (gdk_display, i, ControlMask,
xwindow, False,
ButtonPressMask | ButtonReleaseMask |
PointerMotionMask | PointerMotionHintMask,
GrabModeAsync, GrabModeAsync,
False, None);
-
+ XSync (gdk_display, False);
+ result = gdk_error_trap_pop ();
+
if (result != Success)
meta_warning ("Failed to grab button %d with ControlMask for frame 0x%lx error code %d\n",
i, xwindow, result);