window: Move grab_on_frame to WindowX11
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3584>
This commit is contained in:
parent
de2a24b313
commit
72326d8ca5
@ -1618,10 +1618,10 @@ meta_window_grab_keys (MetaWindow *window)
|
||||
|
||||
if (priv->keys_grabbed)
|
||||
{
|
||||
if (window->frame && !window->grab_on_frame)
|
||||
if (window->frame && !priv->grab_on_frame)
|
||||
change_window_keygrabs (keys, meta_window_x11_get_xwindow (window), FALSE);
|
||||
else if (window->frame == NULL &&
|
||||
window->grab_on_frame)
|
||||
priv->grab_on_frame)
|
||||
; /* continue to regrab on client window */
|
||||
else
|
||||
return; /* already all good */
|
||||
@ -1632,7 +1632,7 @@ meta_window_grab_keys (MetaWindow *window)
|
||||
TRUE);
|
||||
|
||||
priv->keys_grabbed = TRUE;
|
||||
window->grab_on_frame = window->frame != NULL;
|
||||
priv->grab_on_frame = window->frame != NULL;
|
||||
}
|
||||
|
||||
void
|
||||
@ -1650,10 +1650,10 @@ meta_window_ungrab_keys (MetaWindow *window)
|
||||
MetaDisplay *display = window->display;
|
||||
MetaKeyBindingManager *keys = &display->key_binding_manager;
|
||||
|
||||
if (window->grab_on_frame &&
|
||||
if (priv->grab_on_frame &&
|
||||
window->frame != NULL)
|
||||
change_window_keygrabs (keys, window->frame->xwindow, FALSE);
|
||||
else if (!window->grab_on_frame)
|
||||
else if (!priv->grab_on_frame)
|
||||
change_window_keygrabs (keys, meta_window_x11_get_xwindow (window), FALSE);
|
||||
|
||||
priv->keys_grabbed = FALSE;
|
||||
|
@ -506,9 +506,6 @@ struct _MetaWindow
|
||||
/* Are we in meta_window_new()? */
|
||||
guint constructing : 1;
|
||||
|
||||
/* Used by keybindings.c */
|
||||
guint grab_on_frame : 1; /* grabs are on the frame */
|
||||
|
||||
/* Set if the reason for unmanaging the window is that
|
||||
* it was withdrawn
|
||||
*/
|
||||
|
@ -1059,7 +1059,6 @@ meta_window_constructed (GObject *object)
|
||||
window->placed = ((window->mapped && !window->hidden) || window->override_redirect);
|
||||
window->denied_focus_and_not_transient = FALSE;
|
||||
window->unmanaging = FALSE;
|
||||
window->grab_on_frame = FALSE;
|
||||
window->withdrawn = FALSE;
|
||||
window->initial_workspace_set = FALSE;
|
||||
window->initial_timestamp_set = FALSE;
|
||||
|
@ -94,6 +94,7 @@ struct _MetaWindowX11Private
|
||||
|
||||
/* Used by keybindings.c */
|
||||
gboolean keys_grabbed; /* normal keybindings grabbed */
|
||||
gboolean grab_on_frame; /* grabs are on the frame */
|
||||
};
|
||||
|
||||
MetaWindowX11Private * meta_window_x11_get_private (MetaWindowX11 *window_x11);
|
||||
|
@ -2088,6 +2088,7 @@ meta_window_x11_constructed (GObject *object)
|
||||
priv->xclient_leader = None;
|
||||
|
||||
priv->keys_grabbed = FALSE;
|
||||
priv->grab_on_frame = FALSE;
|
||||
|
||||
g_signal_connect (window, "notify::decorated",
|
||||
G_CALLBACK (meta_window_x11_update_input_region),
|
||||
|
Loading…
Reference in New Issue
Block a user