summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Drake <drake@endlessm.com>2014-01-02 09:49:10 -0600
committerAlberts Muktupāvels <alberts.muktupavels@gmail.com>2017-03-18 13:45:06 +0200
commitc66c3bc46f470504bc7d402261294e3cbc2128e3 (patch)
treebe733884b60e0a8356afa725c0b85c0557a04c2e
parent0cfad4b31bf46d8000d10e01d9269ad42b84bc79 (diff)
downloadmetacity-c66c3bc46f470504bc7d402261294e3cbc2128e3.tar.gz
frame: remove unnecessary server grab
meta_window_ensure_frame() creates its own grab and has a comment claiming that it must be called under a grab too. But the reasoning given in the comment does not seem relevant here. We only frame non-override-redirect windows, so we are creating the frame in response to MapRequest. There is no way that the child could receive a MapNotify at this point, since that only happens much later, once we go through the CALC_SHOWING queue and call XMapWindow() from meta_window_show(). Remove the unnecessary grab. https://bugzilla.gnome.org/show_bug.cgi?id=721345
-rw-r--r--src/core/frame.c13
1 files changed, 0 insertions, 13 deletions
diff --git a/src/core/frame.c b/src/core/frame.c
index c4387a5d..192464df 100644
--- a/src/core/frame.c
+++ b/src/core/frame.c
@@ -77,9 +77,6 @@ meta_window_ensure_frame (MetaWindow *window)
if (window->frame)
return;
- /* See comment below for why this is required. */
- meta_display_grab (window->display);
-
frame = g_new (MetaFrame, 1);
frame->window = window;
@@ -121,14 +118,6 @@ meta_window_ensure_frame (MetaWindow *window)
meta_display_register_x_window (window->display, &frame->xwindow, window);
- /* Reparent the client window; it may be destroyed,
- * thus the error trap. We'll get a destroy notify later
- * and free everything. Comment in FVWM source code says
- * we need a server grab or the child can get its MapNotify
- * before we've finished reparenting and getting the decoration
- * window onscreen, so ensure_frame must be called with
- * a grab.
- */
meta_error_trap_push (window->display);
if (window->mapped)
{
@@ -174,8 +163,6 @@ meta_window_ensure_frame (MetaWindow *window)
/* Shape mask */
update_input_shape (frame);
update_shape (frame);
-
- meta_display_ungrab (window->display);
}
void