GNOME Bugzilla – Bug 90409
alt+tab and non take-focus windows
Last modified: 2004-12-22 21:47:04 UTC
Non take-focus windows should be kept off of alt+tab window list by default - actually, metacity does not move input focus to them even when they are selected. I think this behaviour is correct, so not listing these windows will make things more consistent. Perhaps, windows with "_NET_WM_STATE_SKIP_TASKBAR" hints should be also off.
Seems like a good idea.
How does one reach these windows then if you can't use the mouse? Or am I missing something?
About my prev comment: >windows with "_NET_WM_STATE_SKIP_TASKBAR" hints >should be also off. This is not good when the windows have text entries. We should only remove non "take-focus" windows from the list, as they have nothing to do when they own input focus.
Created attachment 12779 [details] [review] never add a window with input = FALSE take_focus = FALSE to tab list
Forgot about this for months.. Okay to commit? * src/display.c (meta_display_get_tab_list): never use a window with input = FALSE take_focus = FALSE as tab_popup window #90409
Can you do it by modifying the IN_NORMAL_TAB_CHAIN and IN_DOCK_TAB_CHAIN macros in window.h? Seems more robust.
Created attachment 12783 [details] [review] 2nd patch for IN_NORMAL_TAB_CHAIN in window.h - verified it works
You need to do the DOCK tab chain also, in case there's a dock window that does not accept focus. With the current patch no-focus windows will show in the dock chain (Ctrl+Alt+Tab) Go ahead and commit with that change, thanks for the patch.
Thanks. I made a change to the DOCK tab chain and confirmed that no-focus window is removed from the list after the change. I did: #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)) #define META_WINDOW_IN_DOCK_TAB_CHAIN(w) \ (((w)->input || (w)->take_focus) && ! META_WINDOW_IN_NORMAL_TAB_CHAIN_TYPE (w)) Is it okay?
Looks perfect, thanks!
Oddly enough now you can't focus xclock via keyboard, but can with the mouse: https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=90529 I guess we might just want to declare xclock broken.
If I remember correctly, alt-tab would not focus xclock even before the patch. xclock existed in the TAB_CHAIN, but metacity did not actually give focus to it by checking take->focus attribute.. None? But, I agree it's inconvenient that alt-tab cannot raise xclock(oclock) window. Maybe, can we have yet another TAB_CHAIN for raising a window?