window: Only grab/ungrab buttons/keys on X11 windows
This commit is contained in:
parent
ebb6847bd1
commit
14f839c53c
@ -1035,13 +1035,6 @@ _meta_window_shared_new (MetaDisplay *display,
|
||||
if (window->decorated)
|
||||
meta_window_ensure_frame (window);
|
||||
|
||||
meta_window_grab_keys (window);
|
||||
if (window->type != META_WINDOW_DOCK && !window->override_redirect)
|
||||
{
|
||||
meta_display_grab_window_buttons (window->display, window->xwindow);
|
||||
meta_display_grab_focus_window_button (window->display, window);
|
||||
}
|
||||
|
||||
if (window->type == META_WINDOW_DESKTOP ||
|
||||
window->type == META_WINDOW_DOCK)
|
||||
{
|
||||
@ -1614,9 +1607,6 @@ meta_window_unmanage (MetaWindow *window,
|
||||
*/
|
||||
meta_stack_tracker_queue_sync_stack (window->screen->stack_tracker);
|
||||
|
||||
meta_window_ungrab_keys (window);
|
||||
meta_display_ungrab_window_buttons (window->display, window->xwindow);
|
||||
meta_display_ungrab_focus_window_button (window->display, window);
|
||||
if (window->display->autoraise_window == window)
|
||||
meta_display_remove_autoraise_callback (window->display);
|
||||
|
||||
|
@ -351,6 +351,10 @@ meta_window_x11_unmanage (MetaWindow *window)
|
||||
*/
|
||||
send_configure_notify (window);
|
||||
|
||||
meta_window_ungrab_keys (window);
|
||||
meta_display_ungrab_window_buttons (window->display, window->xwindow);
|
||||
meta_display_ungrab_focus_window_button (window->display, window);
|
||||
|
||||
meta_error_trap_pop (window->display);
|
||||
}
|
||||
|
||||
@ -2360,6 +2364,14 @@ meta_window_x11_new (MetaDisplay *display,
|
||||
existing_wm_state,
|
||||
effect,
|
||||
&attrs);
|
||||
|
||||
meta_window_grab_keys (window);
|
||||
if (window->type != META_WINDOW_DOCK && !window->override_redirect)
|
||||
{
|
||||
meta_display_grab_window_buttons (window->display, window->xwindow);
|
||||
meta_display_grab_focus_window_button (window->display, window);
|
||||
}
|
||||
|
||||
meta_window_set_surface_mapped (window, TRUE);
|
||||
|
||||
meta_error_trap_pop (display); /* pop the XSync()-reducing trap */
|
||||
|
Loading…
Reference in New Issue
Block a user