Tapping alt-tab switches between windows of the same application sometimes

Bug #998285 reported by Sparhawk
118
This bug affects 21 people
Affects Status Importance Assigned to Milestone
Unity
Fix Released
Wishlist
Gerry Boland
7.2
Triaged
Medium
Unassigned
unity (Ubuntu)
Fix Released
Wishlist
Gerry Boland
Nominated for Trusty by Stephen M. Webb

Bug Description

Normally, tapping alt-tab switches between applications, and tapping alt-` switches between windows of the front-most application. However, if the two front-most windows are from the same application, then alt-tab will switch between these windows instead, instead of moving to the second-front-most application. Hence, in this case, alt-tab duplicates the action of alt-`.

Here is an example:
1) create the stack with two nautilus windows at the top, e.g. Nautilus window 1 (N1), Nautilus window 2 (N2), and Firefox window (F1) (but you can use any applications). Create the stack either by [clicking F1, N2, N1] or [switching to Nautilus with alt-tab, then alt-` to the other Nautilus window].
2) Tap alt-tab.

What happens: I switch to the other nautilus window.

What I expected: to switch to the other application (i.e. Firefox).

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: unity 5.12-0ubuntu1
ProcVersionSignature: Ubuntu 3.2.0-24.37-generic 3.2.14
Uname: Linux 3.2.0-24-generic x86_64
ApportVersion: 2.0.1-0ubuntu7
Architecture: amd64
CompizPlugins: [core,composite,opengl,compiztoolbox,decor,vpswitch,snap,mousepoll,resize,place,move,wall,grid,regex,imgpng,session,gnomecompat,animation,fade,unitymtgrabhandles,workarounds,scale,expo,ezoom,unityshell]
Date: Sat May 12 10:17:21 2012
InstallationMedia: Ubuntu 11.10 "Oneiric Ocelot" - Release amd64 (20111012)
SourcePackage: unity
UpgradeStatus: Upgraded to precise on 2012-04-29 (12 days ago)

Related branches

Revision history for this message
Sparhawk (sparhawkthesecond) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in unity (Ubuntu):
status: New → Confirmed
Revision history for this message
Urustu (urustu) wrote :

I found the solution on this site:
http://doc.ubuntu-fr.org/gnome-shell

Alt+Tab: passer d'une fenêtre à une autre (proche fonction classique).
Alt+Shift+Tab: idem, mais dans l'autre sens.
Alt+²: idem mais entre les fenêtre d'une même application.

Revision history for this message
Sparhawk (sparhawkthesecond) wrote :

Urustu, do you mean stop using Unity and use Gnome-shell?

Also, I've happened upon a workaround while still using Unity. Install ccsm, then deselect Desktop > Ubuntu Unity Plugin > Switcher > Automatically grid windows on timer in switcher. You might need to run "$ unity --replace", but I can select or deselect this setting and the alt-tab behaviour changes accordingly. It's a bit funny that this setting should have this side-effect, as it's not directly related.

(Turning on this setting does the following. When holding onto alt-tab, if you hover over an application icon with multiple windows open, after a short time the window thumbnails are exposed. If this setting is off, then alt-tab only shows the application icon.)

Revision history for this message
Kim Mason (kim-mason) wrote :

This also occurs in Unity on 12.10, but is much more apparent on my older (and slower) laptop (Dell Latitude e5510); to the point where the default alt-tab implementation is frustrating to use. On my new Lenovo x230, it is much less of a problem.

Sparhawk's ccsm work-around fixes it on 12.10 for me as well.

Revision history for this message
Gökçen Eraslan (gkcn) wrote :

Reproducible on Raring, too.

Revision history for this message
Matt Panaro (matt-extensicom) wrote :

I may've found a workaround that doesn't depend on installing any other packages or switching to gnome:
Keyboard settings, shortcuts, navigation, "switch windows of an application"
This was set to "disabled", despite "Alt+`" already switching windows of an application. I explicitly set it to "Alt+`", and now "Alt+Tab" seems to switch to the last used other application, not the last-used other window. Can anyone else confirm this works?

Revision history for this message
Gökçen Eraslan (gkcn) wrote :

I couldn't make it work on up-to-date Raring.

Revision history for this message
Matt Panaro (matt-extensicom) wrote :

Should've mentioned I'm on 12.04

Revision history for this message
Andreas (andreas.t) wrote :

Since the last Unity update, the trick with CSSM doesn't work for me any more.

Revision history for this message
stef (stef2n) wrote :

This issue creeped up on me in 13.10. It's SUUUUUUUUUUUUPER annoying!!!!!!

Let me explain. It's the inconsistency that's the problem. It took me several month to even conceptionalize why I am subliminally irritated by Unity. I use alt-tab and alt-backtick all the time to navigate between apps and windows. For the most part it works well but after a alt-backtick the behavior of alt-tab changes. Even after month this is never what I expect. It's subjectively totally erratic. When I press alt-tab I always want the "previous app." I have this intention a lot. I need a "get me to the previous app" key, not a "sure back to previous app in most of the cases" key.

I get the idea of focusing on the last window no matter what app it was from. This feature may be a ok o the alt-backtick key. It actually makes a lot of sense there because I almost neve switch between windows of the same app after switching the app. For this reason "take me to the last window" feature would usually not interfer with what I expect the button does.

I think way more people would complain about this if it wasn't sucha subliminal annoyance.

Revision history for this message
Gerry Boland (gerboland) wrote :

Annoys me too. My steps to repro:
1. Open 2 instances of QtCreator & one instance of firefox (make all maximized for clarity's sake)
2. Alt-Tab away to firefox
3. Alt-Tab to QtCreator1
4. Alt-backtick to QtCreator2
5. Alt-Tab

Expected result
Firefox should be focused window

Actual result
I'm looking at QtCreator1

This behaviour breaks the paradigm of Alt-Tab between applications, and Alt-` between application windows.

Changed in unity:
status: New → Confirmed
Revision history for this message
Mauro Miolo (mauro-miolo) wrote :

I hate this bug ... and also Unity if is not fixed :( ...
I also prefer the old classic switcher and change windows basing on 'most recent used'.
There is a way restore the old one?

Revision history for this message
Andreas Tsourouflis (andreas-tsourouflis) wrote :

The problem persists in Ubuntu 14.04 Final Beta.
This bug appeared in 12.04, therefore I don't think it will ever be fixed. In my opinion, this proves that only few people use Alt-Tab to switch windows.

Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :

Sorry, but this is not a bug.

What is described here is the wanted design: unity switcher always selects the last used window of the previously used application.
Then, if you were using application A1, then you switch to application B1, a single Alt-Tab will move you back to A1. Instead if you move from A1 to A2, then a single Alt-Tab must move you back to A1, since the current application is the same of the previous one (in this case A = B).

We might accept an option (off by default) that allows to always use the Alt+Tab to only switch between applications, though.

Changed in unity:
status: Confirmed → Won't Fix
Changed in unity (Ubuntu):
status: Confirmed → Invalid
Revision history for this message
Andreas Tsourouflis (andreas-tsourouflis) wrote :

Sorry, Marco, but if this is the intended design, then the design is flawed.

Unity Alt-Tab behavior breaches the system of using one shortcut for switching between applcations and another for switching between windows of the same application.

The reason for using shortcuts to switch windows is to do it automatically and without thought. If you work in a window for some time, you cannot remember which was the last window or application you used. Then, when you attempt to alt-tab switch, the result in Unity will surprise you most of the time.

I have noticed that, when using Unity, my speed of switching windows deteriorates, because each time i press Alt-Tab (i.e. after the first click) I have to pause and see where I have landed. By comparison, switching between windows in Gnome Shell happens considerably faster, because there you just click on Alt-Tab, without giving any thought. In Unity, it goes like that: click, think and then click further. Or worse: click, wtf and then click further.

Please, allow the option you suggested. It will greatly improve the Unity experience for some people.

Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote : Re: [Bug 998285] Re: Tapping alt-tab switches between windows of the same application sometimes

> Sorry, Marco, but if this is the intended design, then the design is
> flawed.

I don't agree here, but feel free to ping JohnLea on #ubuntu-design about this.

> Unity Alt-Tab behavior breaches the system of using one shortcut for
> switching between applcations and another for switching between windows
> of the same application.

Well, as I said, Alt-Tab is not intended to be used to switch between
applications "only", but also to switch to the last used window of the
previous application (and the previous app and the current app might
match).

> The reason for using shortcuts to switch windows is to do it
> automatically and without thought. If you work in a window for some
> time, you cannot remember which was the last window or application you
> used. Then, when you attempt to alt-tab switch, the result in Unity will
> surprise you most of the time.

Well, I guess this depends a lot on how you're used to work. The
behavior that is requested in this bug would, personally, make my life
harder, since I assume that a single Alt-Tab will always bring me back
to the previous window I used, whatever it was.
So, I think this is mostly a matter of tastes and habits.

> Please, allow the option you suggested. It will greatly improve the
> Unity experience for some people.

Indeed, we can safely support an option like that, so patches very welcome ;-)

Revision history for this message
Sune Woeller (sune-woeller) wrote :

Andreas wrote:

"The reason for using shortcuts to switch windows is to do it automatically and without thought."

This is so right. It is very annoying not to able to predict the behavior of alt-tab, to do it without thinking about where you were a few minuttes ago.

It is confusing and slows me down, The only thing I can be sure about is that the alt-tab behavio is sure to give me the wrong window next time.

Revision history for this message
Ben Ritter (benjaminaritter) wrote :

When Alt+Tab is presented as an application switcher, it MUST ACT AS AN APPLICATION SWITCHER. /steam from ears

This is how I, Andreas, and I assume most people new to Unity understand the Alt+Tab and Alt+` behaviour:
"Alt+Tab switches to the previously open application. Alt+` switches to the previously open windows within the current application. Multiple invocations of either will switch to the second, third, etc. most recent application / window."

The behaviour you are advocating sounds something like this:
"Alt+Tab switches to the previously open application. Unless your previous window* is from your current application, in which case it will switch to that. If you press Alt+Tab twice it you will switch to your second most recent application, unless your previous windows is from your current application, in which case it will switch to your most recent application, no matter what your second most recent window was. Alt+` switches to the previous window..."

* Alt+Tab is an application switcher, not a window switcher.

It is utterly bizarre and the cognitive load associated with tracking how many presses needed to get to each window is ridiculous (and totally unnecessary). Like Andreas, I was convinced that my setup was exhibiting some strange bug that I couldn't reproduce that caused Alt+Tab to fail on unspecified occasions. I've come here today, after years of enduring it, because it still frustrates me.

This Ask Ubuntu question[1] indicates that ~16000 people are also surprised by the current behaviour. Over the years, how many of those visitors do you think saw the only viable answer "don't use Unity switcher" and had positive thoughts about Unity? It looks unpolished and lazy and I'm astounded that there is no change 2 years on, while the alternatives fall out of the defaults.

(Collective) you must absolutely change the default behaviour and I implore you to make the change a top priority.

[1] http://askubuntu.com/questions/133046/can-i-configure-alt-tab-to-always-switch-applications

P.S. I'm sorry Marco, that it means breaking your workflow but simplicity must prevail. What you want is a window switcher, not an application switcher. Your exact workflow can remain supported through non-default settings though I put to you that unless the behaviour can be fully explained in one concise sentence, then it doesn't even deserve a place in the GUI.

Revision history for this message
Andreas Tsourouflis (andreas-tsourouflis) wrote :

I agree with Ben and I understand why he is angry. However, I don't think that we should start a dispute about who is right and who is wrong.

I am pretty sure that the Unity devs had their reasons for introducing this Alt-Tab behavior. I am also sure that there is a good deal of people who work with only 3 or 4 windows open and find this switching method very convenient. However, there is another good deal of people who work with many windows open and find the Unity switching method very annoying. So, nobody is wrong and nobody is "cleverer" than the other.

Marco, please don't take it personally that I said in some previous comment that the design was flawed. The flaw does not lie in the choice the Unity devs made but in assuming that there is only one suitable switching method for everybody. As a matter of fact, although we users are grateful to the Unity and Gnome Shell devs for their efforts, our grudge is that they assume their perceived way of working to be the only appropriate one. In conclusion, please allow us, simple users, the option to configure the Alt-Tab behavior and everybody will be happy.

By the way, as regards the use of CSSM, the Unity swither cannot be fully disabled. If you uncheck the Unity switcher and enable the "Static Application Switcher", when you press Alt+`, the Unity switcher still appears.

Changed in unity (Ubuntu):
status: Invalid → Won't Fix
Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :

FYI, the design has not been defined by unity (code) developers, but by designers that found that this "hybrid" behavior is better (and I kinda agree with them).

Anyway, if you would like to introduce an option to always make the Alt-Tab to prefer switching to applications, this is possible and patches welcome (it should be quite easy to do).

Simply, this not an our priority right now.

Changed in unity:
assignee: nobody → Gerry Boland (gerboland)
Changed in unity (Ubuntu):
assignee: nobody → Gerry Boland (gerboland)
Changed in unity:
importance: Undecided → Wishlist
Changed in unity (Ubuntu):
importance: Undecided → Wishlist
Changed in unity:
milestone: none → 7.3.1
status: Won't Fix → In Progress
Changed in unity (Ubuntu):
status: Won't Fix → In Progress
Stephen M. Webb (bregma)
Changed in unity:
milestone: 7.3.1 → 7.3.2
Stephen M. Webb (bregma)
Changed in unity:
milestone: 7.3.2 → 7.3.3
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package unity - 7.3.2+15.04.20150410.1-0ubuntu1

---------------
unity (7.3.2+15.04.20150410.1-0ubuntu1) vivid; urgency=medium

  [ Brandon Schaefer ]
  * When we get a launcher key press (ie. super key). We check if the
    command lens is open. If it is then just switch the lens to the home
    lens. This way we dont close the dash. (LP: #1108956)

  [ CI Train Bot ]
  * New rebuild forced.

  [ Gerry Boland ]
  * SwitcherController: add first selection mode property, to decide
    what to select at first (LP: #998285)

  [ Marco Trevisan (Treviño) ]
  * SwitcherController: add first selection mode property, to decide
    what to select at first (LP: #998285)
  * UnityScreen: terminate spread if active when initiating Switcher
    (LP: #1412001)

  [ Stephen M. Webb ]
  * (Ubuntu packaging) move the session migration scripts to Python3
    (LP: #1440560)
  * fixed the Panel title string expected by Launcher keynav AP tests
    (LP: #1435830)
  * test_wm_keybindings: fix AP failures caused by upstream Compiz
    change (LP: #1294864)
 -- CI Train Bot <email address hidden> Fri, 10 Apr 2015 21:59:12 +0000

Changed in unity (Ubuntu):
status: In Progress → Fix Released
Stephen M. Webb (bregma)
Changed in unity:
status: In Progress → Fix Committed
Changed in unity:
status: Fix Committed → Fix Released
Revision history for this message
vvhk (vvhk-deactivatedaccount-deactivatedaccount) wrote :

What does "Fix Released" mean exactly? I got here because my bug #1568242 was marked duplicate of this, and yet I have this exact problem in 16.04. Had it in 15.10 as well.

Revision history for this message
Andreas Tsourouflis (andreas-tsourouflis) wrote :

You have to run Compiz Confusion Settings Manager. You go to Ubuntu Unity Plugin, then to Switcher tab and you check "Switcher strictly changes between applications". Problem solved

Revision history for this message
vvhk (vvhk-deactivatedaccount-deactivatedaccount) wrote :

@Andreas

The CONFUSION settings manager rather fixed it. Thanks.

@Marco and comment #17

First of all, you're basing on GNOME but breaking the functionality of it with a random decisions to have a hybrid approach. What on earth for? If you don't like Alt-` to switch between windows, then remove it completely in favor of only Alt-Tab. Because if you DO support Alt-` then support it properly and make a distinction from Alt-Tab, otherwise what's the purpose of it?

Second, the behavior your describe broke the EXPECTED functionality of Alt-Tab switching BACK. For example:

1. Open App 1 Window 1
2. Alt-` to App 1 Window 2
3. Alt-Tab (a few times) to (reach) App 2 (window 1)
4. Now Alt-TAB is expected to switch you back to App 1 Window 2, which was the PREVIOUS active window, but what it does is it switches to App 1 Window 1 which is the part that is unexpected, wrong and definitely a bug, still going strong in 16.04.

Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :

As said, this is a designed behavior. It's not a bug.

We want it to work in this way. If you don't want this behavior, just use the tweak tools to get it as you prefer. Problem solved.

Revision history for this message
Devon (devonfyson) wrote :

I agree this is quite annoying and unintuitive. But from what I'm seeing in 16.04, there is no more alt-` by default and the action is back to MS Windows with a simple Alt-tab behaviour which switches between the two last used windows of any app. Then at some point Ubuntu expanded upon that to have alt-tab switch between last used apps and alt-` to switch between last used windows within an app. But now it seems they have decided to backtrack to simplicity causing users to have to yet again re-condition their behaviour which is really frustrating.

There really should be an option for either behaviour. I can't see any options to change this behaviour in the tweak tool or unity plugin in CompizConfigc (ccsm). There should be a third entry in the windows switching shortcuts as "Flip through applications in the switcher" then people can pick to assign alt-tab to that one or the default "start switcher".

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.