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 621287 - First Alt+Tab action should never focus a window out of current workspace
First Alt+Tab action should never focus a window out of current workspace
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: general
unspecified
Other Linux
: Normal enhancement
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
: 650289 651317 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2010-06-11 11:07 UTC by Milan Bouchet-Valat
Modified: 2013-04-28 13:50 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Add gsettings switch to show all workspaces or only current one (2.48 KB, patch)
2011-07-10 09:41 UTC, Nguyen Thai Ngoc Duy
none Details | Review

Description Milan Bouchet-Valat 2010-06-11 11:07:24 UTC
1. Focus a window on workspace 1.
2. Switch to workspace 1, where you have two windows OF THE SAME APP.
3. Press Alt+Tab once.
Result: you get to the window on workspace 1 (last focused window).

OTC, if on workspace 2 you have two windows of different apps, the other window on workspace 2 is focused.

This is really inconsistent and leads to unexpected and confusing results.

I think we could really improve the consistence of workspaces and reduce uncertainty by switching windows only within the current workspace. This is what makes them useful, after all. When you want to switch context, you change workspace, or use Alt+Tab until you get to the other workspace. I guess that was intended, but somewhat broken because of this small bug.
Comment 1 Milan Bouchet-Valat 2010-10-29 14:09:25 UTC
Hm, looks like I made a typo in the workspaces names. Procedure is:
1. Focus a window on workspace 1.
2. Switch to workspace 2, where you have two windows OF THE SAME APP.
3. Press Alt+Tab once.
Result: you get to the window on workspace 1 (last focused window).
Comment 2 Owen Taylor 2010-11-14 23:01:38 UTC
I can see your point here - if I have two windows visible to me on the screen, then there is a sense that hitting alt-Tab once should obviously take you from A to B and not off to somewhere else. So you hit alt-Tab without waiting to look at the popup.

I'm wondering if the special casing of alt-Tab to always take you to the last window, even if it is the same application is counter-productive in building the wrong reflexes - if I see two terminals we want the reflex to get from one to the other I hit alt-` not alt-Tab.

But leaving that aside - I guess your proposal boils down to always considering all the windows of the current workspace more current then the windows of any other workspace, so when you switch to workspace 2, that other window is your "last window" even though it isn't actually in point of fact.

Which does correspond to the way we group applications in the alt-Tab switcher first by workspace and only secondarily by recency.

So I'd be open to a patch here; if we later decide to remove the last-window special casing, then we'd go back to switching to the other desktop because alt-Tab would *always* switch to a different application.
Comment 3 Milan Bouchet-Valat 2010-11-15 08:36:47 UTC
(In reply to comment #2)
> I'm wondering if the special casing of alt-Tab to always take you to the last
> window, even if it is the same application is counter-productive in building
> the wrong reflexes - if I see two terminals we want the reflex to get from one
> to the other I hit alt-` not alt-Tab.
But OTOH, if we don't special case the last focused window, we provide a very inconsistent behavior: depending on whether the last focused window is from the same app, and whether it's on the same workspace, Alt+Tab will react differently. Which is impossible to explain to any user...

(I'm not sure the app-centric thing is really a good idea after all, but let leave that aside for this bug...)
Comment 4 Felipe Contreras (banned) 2011-06-01 01:44:35 UTC
(In reply to comment #2)
> But leaving that aside - I guess your proposal boils down to always considering
> all the windows of the current workspace more current then the windows of any
> other workspace, so when you switch to workspace 2, that other window is your
> "last window" even though it isn't actually in point of fact.

Of course, which is the only sensible way for Alt+Tab to behave, and how all other window managers do it.
Comment 5 Felipe Contreras (banned) 2011-06-01 01:53:55 UTC
*** Bug 650158 has been marked as a duplicate of this bug. ***
Comment 6 Felipe Contreras (banned) 2011-06-01 01:56:15 UTC
*** Bug 650289 has been marked as a duplicate of this bug. ***
Comment 7 Daniel Espinosa 2011-06-01 18:33:14 UTC
Please consider Bug 608946 as related.

Any suggestions must be coordinated with the results of both bugs.
Comment 8 deep64blue 2011-07-07 08:37:21 UTC
Gnome 3's mantra is to minimise distractions so I don't understand why Alt-Tab includes windows on other workspaces - it seems to take away from the very essence of what you are trying to do.
Comment 9 deep64blue 2011-07-07 08:39:52 UTC
Just spotted that Activities works correctly - only the apps running on that workspace are shown which is logical and correct.
Comment 10 Nguyen Thai Ngoc Duy 2011-07-10 09:41:48 UTC
Created attachment 191612 [details] [review]
Add gsettings switch to show all workspaces or only current one

How about a compromise like this? People who are happy with what it is now will continue to be happy. People with "workspace as isolated environment" mindset can set gsettings key app-switcher-all-workspaces to false, and they must use other ways to go to another workspace.
Comment 11 deep64blue 2011-08-10 08:29:52 UTC
(In reply to comment #10)
> Created an attachment (id=191612) [details] [review]
> Add gsettings switch to show all workspaces or only current one
> 
> How about a compromise like this? People who are happy with what it is now will
> continue to be happy. People with "workspace as isolated environment" mindset
> can set gsettings key app-switcher-all-workspaces to false, and they must use
> other ways to go to another workspace.

Great - thanks!
Comment 12 Jeremy Nickurak 2011-11-03 01:33:32 UTC
Related to multi-monitor issue in https://bugzilla.gnome.org/show_bug.cgi?id=650158

If the 2nd monitor is treated as a seperate workspace logically (which in some senses it is -- it has windows on it that exist there and on no other "workspace", at least in the default config with no workspaces there). Therefore a solution to this should probably keep that bug in mind too.
Comment 13 Jeremy Nickurak 2011-11-09 14:34:57 UTC
*** Bug 651317 has been marked as a duplicate of this bug. ***
Comment 14 Pierre Ossman 2011-11-09 19:47:04 UTC
I'd like to vote for this. The current application switcher interferes with the "one workspace, one task" mindset as you keep getting stuff from other workspaces (i.e. other tasks).
Comment 15 Milan Bouchet-Valat 2011-11-13 20:44:42 UTC
*** Bug 650289 has been marked as a duplicate of this bug. ***
Comment 16 Milan Bouchet-Valat 2012-04-30 13:41:59 UTC
*** Bug 675070 has been marked as a duplicate of this bug. ***
Comment 17 Jasper St. Pierre (not reading bugmail) 2013-03-03 21:39:10 UTC
This has been solved by the addition of the window switcher in GNOME 3.6.
Comment 18 xgdgsc 2013-04-28 08:31:07 UTC
It seems it hasn't been fixed ever. Especially in GNOME 3.8 where the white vertical line in alt+tab distinguishing different workspaces is gone! And you can always switch between different workspaces using alt+tab!
Even the gsettings key org.gnome.shell.window-switcher.current-workspace-only True doesn' t work.
How can this been marked as RESOLVED FIXED even without making an option in gnome settings? And why the alt+tab switcher in 3.8 is so randomly ordered without even separating each workspace?
Comment 19 Florian Müllner 2013-04-28 10:43:29 UTC
(In reply to comment #18)
> Even the gsettings key org.gnome.shell.window-switcher.current-workspace-only
> True doesn' t work.

The setting applies to the *window* switcher, not the default *application* switcher.


> How can this been marked as RESOLVED FIXED even without making an option in
> gnome settings?

Guess what - there is an option! Settings -> Keyboard -> Shortcuts -> Switcher Windows. Note that to reassign the <alt>tab shortcut, you'll have to remove it from the switch-applications actions first (bug in gnome-control-center):

  gsettings set org.gnome.desktop.wm.keybindings switch-applications '["<Super>Tab"]'


> And why the alt+tab switcher in 3.8 is so randomly ordered
> without even separating each workspace?

Because it doesn't make much sense in an application switcher - workspaces work in terms of windows, not applications. So if you try to group windows by both application and workspace, you will run into conflicts whenever an application has multiple windows open spread across workspaces. As a result, the previous application switcher violated a very basic assumption: use alt-tab to switch somewhere, use alt-tab again to switch back to where you were. The new ordering is much simpler and straightforward, and therefore more predictable and actually *less* random.
So again, if you want grouping by workspaces(*) rather than applications, use the window switcher instead of the application switcher.

(*) note that there's no real grouping by workspace, only the option you already found; I'm not opposed to the addition of such an option to the window switcher though.
Comment 20 xgdgsc 2013-04-28 11:30:03 UTC
(In reply to comment #19)
Thanks. I tried disabling application-switcher and assigned alt tab to window switcher, that's much better for me, hope the option could be more obvious(without gsettings). 

I think group windows by both application and workspace can be done by simply ignoring same app window from other workspaces. Traditionally workspaces like this are used to separate different tasks and make them not interfere with each other. I don' t get why gnome 3 decided to mix all workspaces as a whole, do you get productivity boost from this? I am really curious about how developers use their product, what workflow do you enjoy when using Gnome shell? I guess I have to change to adapt to the Gnome 3 way of doing things.
Comment 21 Jasper St. Pierre (not reading bugmail) 2013-04-28 13:50:27 UTC
Some people simply use workspaces as a way of cleaning up their desktop when it gets a bit too crowded.