summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/frame.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/frame.c b/src/frame.c
index 0599c84..41a78b8 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -36,11 +36,12 @@ meta_window_ensure_frame (MetaWindow *window)
{
MetaFrame *frame;
XSetWindowAttributes attrs;
-
- g_return_if_fail (window->display->server_grab_count > 0);
if (window->frame)
return;
+
+ /* See comment below for why this is required. */
+ meta_display_grab (window->display);
frame = g_new (MetaFrame, 1);
@@ -127,6 +128,8 @@ meta_window_ensure_frame (MetaWindow *window)
/* Move keybindings to frame instead of window */
meta_window_grab_keys (window);
+
+ meta_display_ungrab (window->display);
}
void