window-x11: Move take_focus to MetaWindowX11Private

https://gitlab.gnome.org/GNOME/mutter/merge_requests/421
This commit is contained in:
Marco Trevisan (Treviño)
2019-01-30 20:19:41 +01:00
committed by Marco Trevisan
parent 43633d6b2f
commit 6c3b0cfc36
6 changed files with 30 additions and 11 deletions

View File

@ -327,7 +327,6 @@ struct _MetaWindow
guint icon_geometry_set : 1;
/* These are the flags from WM_PROTOCOLS */
guint take_focus : 1;
guint delete_window : 1;
guint can_ping : 1;
/* Globally active / No input */
@ -699,11 +698,11 @@ gboolean meta_window_same_application (MetaWindow *window,
#define META_WINDOW_IN_NORMAL_TAB_CHAIN_TYPE(w) \
((w)->type != META_WINDOW_DOCK && (w)->type != META_WINDOW_DESKTOP)
#define META_WINDOW_IN_NORMAL_TAB_CHAIN(w) \
(((w)->input || (w)->take_focus ) && META_WINDOW_IN_NORMAL_TAB_CHAIN_TYPE (w) && (!(w)->skip_taskbar))
(meta_window_is_focusable (w) && META_WINDOW_IN_NORMAL_TAB_CHAIN_TYPE (w) && (!(w)->skip_taskbar))
#define META_WINDOW_IN_DOCK_TAB_CHAIN(w) \
(((w)->input || (w)->take_focus) && (! META_WINDOW_IN_NORMAL_TAB_CHAIN_TYPE (w) || (w)->skip_taskbar))
(meta_window_is_focusable (w) && (! META_WINDOW_IN_NORMAL_TAB_CHAIN_TYPE (w) || (w)->skip_taskbar))
#define META_WINDOW_IN_GROUP_TAB_CHAIN(w, g) \
(((w)->input || (w)->take_focus) && (!g || meta_window_get_group(w)==g))
(meta_window_is_focusable (w) && (!g || meta_window_get_group(w)==g))
void meta_window_free_delete_dialog (MetaWindow *window);

View File

@ -1079,7 +1079,6 @@ _meta_window_shared_new (MetaDisplay *display,
window->initial_timestamp_set = FALSE;
window->net_wm_user_time_set = FALSE;
window->user_time_window = None;
window->take_focus = FALSE;
window->delete_window = FALSE;
window->can_ping = FALSE;
window->input = TRUE;
@ -4689,8 +4688,8 @@ meta_window_focus (MetaWindow *window,
window->restore_focus_on_map = FALSE;
meta_topic (META_DEBUG_FOCUS,
"Setting input focus to window %s, input: %d take_focus: %d\n",
window->desc, window->input, window->take_focus);
"Setting input focus to window %s, input: %d focusable: %d\n",
window->desc, window->input, meta_window_is_focusable (window));
if (window->display->grab_window &&
window->display->grab_window != window &&