Alt+Tab/Alt+grave brings other window to the front but loses focus entirely.

Bug #1035628 reported by jhfhlkjlj
192
This bug affects 37 people
Affects Status Importance Assigned to Milestone
Unity
Fix Released
High
Brandon Schaefer
5.0
Fix Released
High
Brandon Schaefer
6.0
Fix Released
High
Brandon Schaefer
unity (Ubuntu)
Fix Released
High
Unassigned
Precise
Fix Released
High
Unassigned

Bug Description

[Impact]

Focus losing possibility when alt-`/alt-tab:ing.

[Test Case]

Alt+Tab doesn't lose window focus
---------------------------------
This tests ensures that a racing condition is not possible anymore when alt+tabing.

Setup:
#. Have 2 windows of different types open. (gedit, nautilus)

Actions:
#. Press quicky Alt+Tab. (so that the switcher window is not shown)
#. Repeat 10 times.

Expected Results:
No window loses focuses at all. The panel should alway show the title of the window.

[Regression Potential]

Application switching in general.

---

SRU TESTCASE:

1. open two terminals
2. quickly press alt-` a couple of times so that the switcher appears

What should happen:
no matter how many times you alt-` the focus should never be lost i.e. unity panel should not look like comment#6

-----Original Report-----
Ever since upgrading to Unity 5.14.0-0ubuntu1 a few days ago, my alt+tabs have been constantly breaking. I use alt+tab quickly, fast enough to never see the switcher. The issue is that a good percentage of the time, the window is brought to the front and the focus is momentarily flickered onto the desired window but then the focus is entirely lost: Nothing is in the titlebar and any input goes nowhere.

I don't recall any problems with the version previous to this update pushed (5.12-0ubuntu1.1)

video demonstrating the bug: https://bugs.launchpad.net/ubuntu/+source/unity/+bug/1035628/+attachment/3258477/+files/bug.webm

Alt+` also loses focus regularly, even if there is only one window.

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: unity 5.14.0-0ubuntu1
ProcVersionSignature: Ubuntu 3.2.0-29.46-generic 3.2.24
Uname: Linux 3.2.0-29-generic x86_64
ApportVersion: 2.0.1-0ubuntu12
Architecture: amd64
CheckboxSubmission: 9dfa225a100a6da71689692d7002e544
CheckboxSystem: 2954e74ba17fb0e37fc942cd1d9fab4e
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 Aug 11 09:01:20 2012
InstallationMedia: Ubuntu 12.04 LTS "Precise Pangolin" - Release amd64 (20120425)
SourcePackage: unity
UpgradeStatus: No upgrade log present (probably fresh install)

Related branches

Revision history for this message
jhfhlkjlj (fdsuufijjejejejej-deactivatedaccount) wrote :
tags: added: regression-update
description: updated
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
Jason Conti (jconti) wrote :

I've had a similar problem, but with alt+`. Switch between two windows quickly, and sometimes they don't switch, sometimes they will lose focus in the switch.

Another weird issue I've noticed:

* Open 2 Terminal windows
* Hold alt+` until the window previews appear
* Keep holding the key combination and after a few seconds, the window previews will swap positions (so if I try to swap windows quickly, I will select the wrong one)

Revision history for this message
jhfhlkjlj (fdsuufijjejejejej-deactivatedaccount) wrote :

I know of that issue as well, Jason. Hop on over to bug 1035712 and confirm it.

Changed in unity (Ubuntu):
importance: Undecided → High
status: Confirmed → Triaged
importance: High → Medium
description: updated
Revision history for this message
Omer Akram (om26er) wrote :

Can you please make a video of the problem?

Changed in unity (Ubuntu):
status: Triaged → Incomplete
Changed in unity:
status: New → Incomplete
importance: Undecided → Medium
Revision history for this message
jhfhlkjlj (fdsuufijjejejejej-deactivatedaccount) wrote :
description: updated
Changed in unity:
status: Incomplete → Confirmed
Changed in unity (Ubuntu):
status: Incomplete → Triaged
Revision history for this message
Omer Akram (om26er) wrote :

Could anyone else in the bug report please confirm if the same issue happens for them as well? I have tried alt-tab like crazy with the two example apps that you are using in the video but did not face the issue a single time. I can't deny the video ofcourse but I guess it would be better if we get someone else to confirm the issue as well. Also have it happened without nautilus? (nautilus have been known to have focus issue with unity in the past).

Changed in unity:
status: Confirmed → Incomplete
Changed in unity (Ubuntu):
status: Triaged → Incomplete
Revision history for this message
Jason Conti (jconti) wrote :

After playing around a bit I can reproduce it with alt+tab as well, it just doesn't happen as frequently. For testing I only had two windows open, gnome-terminal and Chrome. It seems to occur most frequently with a slower alt+tab, but fast enough to avoid the window switcher appearing on screen. Starting with gnome-terminal, alt+tab to Chrome, alt+tab back to the terminal, then alt+tab too slowly so the hud pops up briefly followed by alt so it immediately disappears and the terminal will be the front window but unfocused.

With three windows open (two terminals and Chrome), I managed to get Chrome to lose focus, but I couldn't repeat it. I repeated the above 5 or 6 times (but it isn't consistant).

Revision history for this message
jhfhlkjlj (fdsuufijjejejejej-deactivatedaccount) wrote :

It occurs regardless of application or speed of switch. I just happens. It hiccups, focusing the window for a split second, and then gives up and focuses nothing.

Revision history for this message
Daniel Seither (tiwoc) wrote :

For me, it happens around one in three times when I switch between windows fast enough for the switcher not to be shown, just as demonstrated in the video by Chauncellor. The problem seems to be independent from Nautilus as it happens for example when switching between Firefox and the Gnome terminal.

I also don't remember encountering this bug before the update of Unity a few days ago.

Revision history for this message
Omer Akram (om26er) wrote :

sounds like a race to me, I have been trying to reproduce this for the past 5mins have been pressing alt-tab like crazy but have not been able to. still setting to confirmed as a few people in the report confirmed.

Changed in unity (Ubuntu):
status: Incomplete → Confirmed
Changed in unity:
status: Incomplete → Confirmed
Revision history for this message
Omer Akram (om26er) wrote :

Also if anyone in this bug report is using Quantal, please do test if it happens there as well or if its specific to 12.04.

Changed in unity (Ubuntu Precise):
importance: Undecided → Medium
status: New → Confirmed
Revision history for this message
Edward Donovan (edward.donovan) wrote :

Omer - I have not been able to reproduce this yet under Quantal. Thanks.

Revision history for this message
Edward Donovan (edward.donovan) wrote :

I tried some more fast alt-tabbing under Quantal; never lost focus. (I do lose window focus in different ways that I'm still trying understand and match to bug reports, so it's possible this has happened to me at some point, but I don't think so.)

By the way, Omer, thank you for finding the right master for bug 1037834. I knew I had seen it, but I was searching for 'alt-tab', and couldn't see this 'alt+tab'. Now I see that just 'alt tab' will match both; I hadn't trusted that enough.

Thanks.

Revision history for this message
jhfhlkjlj (fdsuufijjejejejej-deactivatedaccount) wrote :

I've discovered that if I alt+tab fast enough and start typing, I can get a few characters inputted before the focus is lost.

Revision history for this message
Omer Akram (om26er) wrote : Re: [SRU Regression] Alt+Tab loses brings other window to the front but loses focus entirely.

marked invalid for Quantal then.

summary: - [Regression] Alt+Tab loses brings other window to the front but loses
- focus entirely.
+ [SRU Regression] Alt+Tab loses brings other window to the front but
+ loses focus entirely.
Changed in unity (Ubuntu):
status: Confirmed → Invalid
Changed in unity:
milestone: none → 5.16.0
Revision history for this message
androith (androith) wrote :

Can anybody else confirm this is not present in Quantal? It's a difficult-to-reproduce bug, and I'd hate to see it back when I upgrade. I think that this was introduced with the latest Unity patch which messed with ALT-TAB (a different bug was solved, where ALT-TAB switcher sometimes failed to appear), since I didn't notice it before the latest update and now I notice it all the time.

summary: - [SRU Regression] Alt+Tab loses brings other window to the front but
+ [SRU Regression] Alt+Tab/Alt+grave brings other window to the front but
loses focus entirely.
description: updated
Revision history for this message
androith (androith) wrote : Re: [SRU Regression] Alt+Tab/Alt+grave brings other window to the front but loses focus entirely.

To those affect by this bug: Do you have the gnome 3 ppa in your sources? Perhaps some package from gnome's PPA messes with this.

Revision history for this message
Dave Wickham (dave.wickham) wrote :

Nope; I had it in my sources a couple of years ago, but it's been disabled for a long time.

Revision history for this message
Daniel Manrique (roadmr) wrote :

Hi, I'm affected and I've never had the gnome 3 PPA.

Revision history for this message
Chris Weiss (cweiss) wrote :

I did not see this bug in 12.04, but I do see it in Quantal. if I hold alt-tab long enough to see the switcher, it does not happen, but happens every time I do it quickly. My guess is that switcher is launching as I release the keys, it then shows up enough to take focus and realize the keys are released and goes away leaving focus in limbo.

I have not had gnome3 PPA's on either installation. My 12.04 was in place upgrade from each version since 10.04, but my Quantal is a clean install but keeping the /home.

Revision history for this message
Ryan Finnie (fo0bar) wrote :

I saw this after the regression in Precise, and it was happening with alarming frequency (once approximately every 5 alt-tabs). This weekend I did d-r-u to Quantal, and it did not occur for a few days, but I'm starting to see it again, though not as frequently as with Precise.

Revision history for this message
Dr_Snooz (pr2) wrote :

I'm getting this a lot flipping between LibreOffice Writer and Firefox in 12.04.

Revision history for this message
Omer Akram (om26er) wrote :

I am now seeing this in Quantal with everything fully updated

Changed in unity (Ubuntu):
status: Invalid → Confirmed
Changed in unity:
milestone: 5.16.0 → 6.8
summary: - [SRU Regression] Alt+Tab/Alt+grave brings other window to the front but
- loses focus entirely.
+ Alt+Tab/Alt+grave brings other window to the front but loses focus
+ entirely.
Changed in unity:
importance: Medium → High
Changed in unity (Ubuntu):
importance: Medium → High
Changed in unity (Ubuntu Precise):
importance: Medium → High
Changed in unity:
assignee: nobody → Brandon Schaefer (brandontschaefer)
Changed in unity:
status: Confirmed → In Progress
Revision history for this message
Edward Donovan (edward.donovan) wrote :

(sorry to me-too, a bit)

I'm seeing it in Quantal now, too.

You've all probably noticed, but: a workaround, or a recovery, is to tap Alt twice. After raising and dismissing the HUD, I always find the top window back in focus. (Given that proper focus has been lost. After the HUD or Dash, sometimes focus is wrong, I forget that bug number right now. But another round-trip has always brought it back.)

Thanks.

Changed in unity:
milestone: 6.8 → 7.0
status: In Progress → Fix Committed
Revision history for this message
Omer Akram (om26er) wrote :

Hi everyone. I have packaged the fix for this bug in my ppa for 12.04 users (ppa:om26er/unity). Please test and give feedback.

Revision history for this message
Joseph Brown (1st2be) wrote :

Much better, Thanks Omer! Makes Unity more usable 4 me.

The icon list that appears still needs to diminish (shade darker) unselected apps, otherwise, it's difficult to determine which is selected, w/out burning a extra calories discerning the difference.

Revision history for this message
jhfhlkjlj (fdsuufijjejejejej-deactivatedaccount) wrote :

Thank you SO much for making a PPA, omer. This bug was driving me up the wall. So far, so good.

Revision history for this message
Emilio Gallego (egallego-babel) wrote :

6.6.0-0ubuntu3 makes the problem to occur again.!

Revision history for this message
Emilio Gallego (egallego-babel) wrote :

Forgot to say that this is a fresly installed Quantal from 2 days ago, the bug is reproduced with a completely new user from empty /home. Don't hesistate to contact me for more details.

Revision history for this message
Brandon Schaefer (brandontschaefer) wrote :

Wait for that status at the top to change from Fix Committed to Fix Released. Committed means it is in the trunk version of unity, but has not yet been released. If you want to test the fix out test omers ppa. The fix will come at you in 6.8 (You have 6.6). :) Hope this is helpful.

ppa:om26er/unity

Revision history for this message
Emilio Gallego (egallego-babel) wrote :

Hi Brandon, thanks for you help. I was using Omar's ppa and it didn't fix the bug.

Anyways, that ppa is now uninstalable for unmet compiz dependencies. Best, Emilio

Revision history for this message
Omer Akram (om26er) wrote :

The ppa only contains a fix for Precise, Do NOT use it on quantal as the package there fixes a totally different bug.

Revision history for this message
Emilio Gallego (egallego-babel) wrote :

Hi Omar, I'm sorry for the confusion, thanks for clarifying.

Is it an option to install unity 6.8.0 in Quantal? I can compile/built the packages without any problem.

Best, Emilio

Revision history for this message
Emilio Gallego (egallego-babel) wrote :

Hi all, I built unity-6.0 "trunk" (along with nux) and the bug seems to go away!

What a relief for a ultra-heavy alt-tab user like me.

For any quantal user that cannot wait, the packages are at http://babel.ls.fi.upm.es/~egallego/packages/

Use them at your own risk, they are not in repository format for a reason!

Changed in unity (Ubuntu):
status: Confirmed → Fix Committed
status: Fix Committed → Confirmed
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (4.2 KiB)

This bug was fixed in the package unity - 6.8.0-0ubuntu1

---------------
unity (6.8.0-0ubuntu1) quantal-proposed; urgency=low

  [ Ángel Guzmán Maeso ]
  * debian/unity-crashdb.conf:
    - Update dictionary option for follow latest apport spec

  [ Łukasz 'sil2100' Zemczak ]
  * New upstream release.
    - unity 6.8 candidate segfaults on "app expose" with low gfx mode
      (LP: #1060148)
    - [regression] Dash - Left separator is missing (LP: #1057798)
    - unity-panel-service crashed with SIGSEGV in
      panel_indicator_entry_accessible_get_n_children() from
      atk_object_get_n_accessible_children() (LP: #913324)
    - [regression] If unity is started with maximized dash, unmaximizing the
      dash does not wrap rows (LP: #1053116)
    - Dash lens buttons don't work after changing form factor to maximize on
      desktop (LP: #1053316)
    - Clicking on Workspace Switcher icon when the expo is showing, not always
      closes it 1059759 convert files list deprecated keys (LP: #1059594)
    - Unity through llvmpipe is slow (LP: #1046497)
    - compiz crashed with SIGSEGV in unity::QuicklistView::Show() from
      unity::QuicklistManager::ShowQuicklist() (LP: #1055995)
    - compiz crashed with SIGSEGV from
      unity::dash::HomeLens::Impl::LensSearchFinished() (LP: #1054219)
    - [regression] Starting an app & then locking to launcher is not persistent
      across sessions (LP: #1054645)
    - [regression] Dash, Launcher, Menu Bar - Unintended shadows are rendered
      for the Unity Launcher and Panel, when the dash is open (LP: #1043260)
    - [Unity 6.x] Active blur doesn't update if you disable CCSM > OpenGL >
      Framebuffer object (LP: #1039999)
    - Alt+Tab/Alt+grave brings other window to the front but loses focus
      entirely. (LP: #1035628)
    - Spread - Scaling all the windows is too slow (LP: #1055643)
    - Window management - Middle clicking on a window inside the spread should
      close that window (equivalent action to clicking on the close button)
      (LP: #1052821)
    - Scale window decorations don't have properly rounded corners
      (LP: #1055610)
    - Scale window decorations text does not match theme style (Radiance)
      (LP: #1055609)
    - Spread window decorations does not match the theme when changed
      (LP: #1055605)
    - scaled window decorations are sometimes wider than the window
      (LP: #1053225)
    - Launcher should not auto-hide after dragging an icon, if mouse is still
      over it (LP: #1053978)
    - unity spread window on second click not working when ibus language panel
      is shown. (LP: #1035895)
    - windows.push_back(<uninitialized value>) in
      BamfLauncherIcon::GetFocusableWindows (LP: #1053220)
    - Category emblems are blurry (LP: #1056874)
    - Rendering flaws of the dash previews (LP: #1055455)
    - [UIFe] Social Lens doesn't have authorised and meaningful icon
      (LP: #1056191)
    - [dash] Preview fade out animation hangs occasionally (LP: #1058145)
    - Dash - rendering of ribbons shouldn't be relative (LP: #1057971)
    - Horizontal alignment search box and views below (LP: #1055544)
    - Compiz crashed in cairo_save() from
      unity::Unit...

Read more...

Changed in unity (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
Frank Groeneveld (frankgroeneveld) wrote :

Thanks a lot for fixing this! :)

When will we see this in the repo's for 12.04? Any estimates?

Omer Akram (om26er)
description: updated
description: updated
Revision history for this message
Chris Halse Rogers (raof) wrote : Please test proposed package

Hello Chauncellor, or anyone else affected,

Accepted unity into precise-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/unity/5.18.0-0ubuntu1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please change the bug tag from verification-needed to verification-done. If it does not, change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in unity (Ubuntu Precise):
status: Confirmed → Fix Committed
tags: added: verification-needed
Revision history for this message
Miklos Juhasz (mjuhasz) wrote :

The proposed package fixed this issue for me. Tested with both Alt+Tab and Alt+`.

tags: added: verification-done
removed: verification-needed
Revision history for this message
jhfhlkjlj (fdsuufijjejejejej-deactivatedaccount) wrote :

Aye, so far so good.

Revision history for this message
androith (androith) wrote :

Confusingly, I went away from Unity for a while and came back last week. The bug is also gone for me, even though I don't use the proposed repository (although my machine is fully updated).

Revision history for this message
Hassan Williamson (hazrpg) wrote :

Still affects me and I'm patched up to the max that backports gives out.

If you need any more info, just ask... my system details are below:

$ unity --version; apt-cache policy unity; lsb_release -a; uname -a;
unity 5.16.0
unity:
  Installed: 5.16.0-0ubuntu1
  Candidate: 5.16.0-0ubuntu1
  Version table:
 *** 5.16.0-0ubuntu1 0
        500 http://gb.archive.ubuntu.com/ubuntu/ precise-updates/main amd64 Packages
        100 /var/lib/dpkg/status
     5.10.0-0ubuntu6 0
        500 http://gb.archive.ubuntu.com/ubuntu/ precise/main amd64 Packages
LSB Version: core-2.0-amd64:core-2.0-noarch:core-3.0-amd64:core-3.0-noarch:core-3.1-amd64:core-3.1-noarch:core-3.2-amd64:core-3.2-noarch:core-4.0-amd64:core-4.0-noarch
Distributor ID: Ubuntu
Description: Ubuntu 12.04.1 LTS
Release: 12.04
Codename: precise
Linux penguin 3.2.0-34-generic #53-Ubuntu SMP Thu Nov 15 10:48:16 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

Revision history for this message
Colin Watson (cjwatson) wrote :

@Hassan Williamson: The unity update (version 5.18.0-0ubuntu1) in question is in -proposed, not in -backports. I'm just releasing it to -updates now, so you should get it shortly.

Revision history for this message
Colin Watson (cjwatson) wrote : Update Released

The verification of this Stable Release Update has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regresssions.

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

This bug was fixed in the package unity - 5.18.0-0ubuntu1

---------------
unity (5.18.0-0ubuntu1) precise-proposed; urgency=low

  * New upstream release.
    - Launcher: start the drag icon request from the original mouse-down
      position. (LP: #858540)
    - Ignore transient unmmaped windows on minimize/unminimize
      (LP: #929712)
    - Fixes alt+tab losing focus when alt+tabing to quickly due to ubus
      being to slow to send a message (LP: #1035628)
    - If no icon is found then use the default one. This will cause all
      blank icons to be a '?' icon (LP: #886778)
    - Use GMountOperation in g_volume_mount. GMountOperation provides a
      mechanism for interacting with the use. (LP: #713432)
    - Do not reuse the menu entries if their order changes (LP: #1062283)
    - BamfLauncherIcon: ensure the icon and name values when the running
      state changes. This avoids to get "?" icons. (LP: #772986)
    - Use linear filtering to draw icons (when needed). (LP: #1036231)
 -- Timo Jyrinki <email address hidden> Mon, 12 Nov 2012 14:17:04 +0200

Changed in unity (Ubuntu Precise):
status: Fix Committed → Fix Released
Revision history for this message
Stephen M. Webb (bregma) wrote :

Fix Released in Unity Unity 7.0.0 "R series".

Changed in unity:
status: Fix Committed → Fix Released
Revision history for this message
Robert Siemer (robert-siemer-launchpad-net) wrote :

I upgrade to precise a couple of days ago. I do have this bug, but I don’t use unity! I use the static-app-switcher with compiz and gnome-panel.

Is it a general switcher-trap and only unities switcher was fixed?

Revision history for this message
Robert Siemer (robert-siemer-launchpad-net) wrote :

...unity’s switcher was fixed?

Revision history for this message
Robert Siemer (robert-siemer-launchpad-net) wrote :

I have unity 5.20.0 from precise-updates installed, but as I said, I don’t have the Unity Plugin activated for compiz.

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

Other bug subscribers

Remote bug watches

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