After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 90409 - alt+tab and non take-focus windows
alt+tab and non take-focus windows
Status: RESOLVED FIXED
Product: metacity
Classification: Other
Component: general
unspecified
Other All
: Normal minor
: GNOME2.x
Assigned To: Metacity maintainers list
Metacity maintainers list
Depends on: 90382
Blocks:
 
 
Reported: 2002-08-10 15:06 UTC by Hidetoshi Tajima
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
never add a window with input = FALSE take_focus = FALSE to tab list (588 bytes, patch)
2002-12-05 23:10 UTC, Hidetoshi Tajima
none Details | Review
2nd patch for IN_NORMAL_TAB_CHAIN in window.h - verified it works (706 bytes, patch)
2002-12-06 01:11 UTC, Hidetoshi Tajima
none Details | Review

Description Hidetoshi Tajima 2002-08-10 15:06:09 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.
Comment 1 Havoc Pennington 2002-08-10 15:17:41 UTC
Seems like a good idea.
Comment 2 Luis Villa 2002-08-12 21:41:54 UTC
How does one reach these windows then if you can't use the mouse? Or
am I missing something?
Comment 3 Hidetoshi Tajima 2002-08-13 01:52:30 UTC
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.

Comment 4 Hidetoshi Tajima 2002-12-05 23:10:01 UTC
Created attachment 12779 [details] [review]
never add a window with input = FALSE take_focus = FALSE to tab list
Comment 5 Hidetoshi Tajima 2002-12-05 23:15:01 UTC
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
Comment 6 Havoc Pennington 2002-12-06 00:30:04 UTC
Can you do it by modifying the IN_NORMAL_TAB_CHAIN and 
IN_DOCK_TAB_CHAIN macros in window.h?
Seems more robust.
Comment 7 Hidetoshi Tajima 2002-12-06 01:11:42 UTC
Created attachment 12783 [details] [review]
2nd patch for IN_NORMAL_TAB_CHAIN in window.h - verified it works
Comment 8 Havoc Pennington 2002-12-06 01:51:42 UTC
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.
Comment 9 Hidetoshi Tajima 2002-12-06 03:09:18 UTC
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?
Comment 10 Havoc Pennington 2002-12-06 05:07:00 UTC
Looks perfect, thanks!
Comment 11 Havoc Pennington 2003-05-13 18:43:13 UTC
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.
Comment 12 Hidetoshi Tajima 2003-05-13 21:18:10 UTC
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?