Minimizing a window should switch focus to the windows underneath it (breaks restore)

Bug #859885 reported by Nicolás Abel Carbone on 2011-09-26
This bug report is a duplicate of:  Bug #1195518: Window focus wrong after minimizing. Edit Remove
This bug affects 55 people
Affects Status Importance Assigned to Milestone
Fix Released
Sam Spilsbury
compiz (Ubuntu)
Sam Spilsbury
unity (Ubuntu)
Sam Spilsbury

Bug Description

When you minimize a window to the launcher, it remains with the focus, meaning that, for example, the global menu is the menu of the now minimized window.
The focus should automatically go to the window immediately underneath it or, if no other window is open, to the desktop.
It is particularly confusing when you minimize a window and then go to the global menu, expecting it to be the menu of the window being displayed on top now, but instead is the menu of the app you just minimized.

Note another side effect:
1. minimize a window like thunderbird (only one instance opened)
2. click on the launcher to show it again
-> you can't restore it as it's focused

ProblemType: Bug
DistroRelease: Ubuntu 11.10
Package: unity 4.18.0-0ubuntu1
ProcVersionSignature: Ubuntu 3.0.0-11.18-generic 3.0.4
Uname: Linux 3.0.0-11-generic x86_64
ApportVersion: 1.23-0ubuntu1
Architecture: amd64
CompizPlugins: [core,bailer,detection,composite,opengl,decor,move,compiztoolbox,snap,vpswitch,resize,gnomecompat,imgpng,mousepoll,grid,regex,place,wall,session,unitymtgrabhandles,animation,workarounds,fade,scale,expo,ezoom,unityshell]
Date: Mon Sep 26 15:25:04 2011
InstallationMedia: Ubuntu 11.10 "Oneiric Ocelot" - Beta amd64 (20110921.2)
SourcePackage: unity
UpgradeStatus: No upgrade log present (probably fresh install)

Related branches

I'll add more things to this bug.

When you have two maximized windows, one in front of another, you can't serially minimize them by repeatedly pressing the minimize button. The second click will fail, because the focus is in an already minimized window.

Even worse, if you have two maximized windows as before, minimize the first, and then try to close the second, compiz will crash (or close itself).

There is, of course, a "workaround" that is clicking in anyplace of the second maximized window to give it the focus. However, this is an extra, counter-intuitive, step. I, in my humble opinion, think that this is a serious bug that should be solve before the final release of Ubuntu 11.10.

Changed in unity (Ubuntu):
status: New → Confirmed
Changed in unity:
status: New → Confirmed
Jacopo Moronato (jmoronat) wrote :

Adding compiz from duplicate.

tags: removed: amd64
Launchpad Janitor (janitor) wrote :

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

Changed in compiz (Ubuntu):
status: New → Confirmed
Didier Roche (didrocks) on 2011-09-27
description: updated
tags: added: didrocks-oneiric-list
summary: Minimizing a window should switch focus to the windows underneath it
+ (breaks restore)
description: updated
Changed in unity:
milestone: none → 4.20.0
importance: Undecided → High
Changed in unity (Ubuntu):
importance: Undecided → High
Changed in unity:
status: Confirmed → Triaged
Changed in unity (Ubuntu):
status: Confirmed → Triaged
Changed in compiz (Ubuntu):
status: Confirmed → Triaged
Heero_Yuy (heeroyuy) wrote :

Yea just had the same thing happen to me today, didn't happen before the update ! :(

Changed in unity:
assignee: nobody → Sam Spilsbury (smspillaz)
Changed in compiz (Ubuntu):
assignee: nobody → Sam Spilsbury (smspillaz)
Changed in unity (Ubuntu):
assignee: nobody → Sam Spilsbury (smspillaz)
Jason Smith (jassmith) on 2011-09-29
Changed in unity (Ubuntu):
status: Triaged → Fix Committed
Changed in unity:
status: Triaged → Fix Committed
Changed in compiz (Ubuntu):
status: Triaged → Fix Committed
Omer Akram (om26er) on 2011-09-29
Changed in compiz (Ubuntu):
importance: Undecided → High
Didier Roche (didrocks) on 2011-09-29
Changed in unity:
status: Fix Committed → Fix Released
Launchpad Janitor (janitor) wrote :
Download full text (5.7 KiB)

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

unity (4.20.0-0ubuntu1) oneiric; urgency=low

  * New upstream release + cherry-pick:
    - compiz crashed with SIGSEGV in PluginClassHandler<UnityWindow,
      CompWindow, 0>::get() (LP: #835259)
    - dash does not scroll down during keyboard navigation (LP: #852506)
    - compiz crashed with SIGSEGV in _XFreeEventCookies() (LP: #851472)
    - compiz crashed with SIGSEGV in g_object_unref() (LP: #847512)
    - compiz crashed with SIGSEGV in nux::WindowCompositor::MouseEventCycle()
      (LP: #831678)
    - compiz and X can disagree on the stacking order (LP: #845719)
    - compiz crashed with SIGSEGV in unity::dash::LensView::OnResultAdded()
      (LP: #855252)
    - CCSM crashes Unity (LP: #861643)
    - compiz crashed with SIGSEGV in PrivateWindow::addWindowStackChanges()
      (LP: #862115)
    - Touch - When dragging a window with a 3 touch, dragging to the top
      should show the maximize gesture preview. (LP: #750316)
    - compiz crashed with SIGABRT in raise() (LP: #750386)
    - Launcher - Spread should not affect the state of window (LP: #764673)
    - [UIFe] Add system setting icon to Launcher (LP: #764744)
    - compiz crashed with SIGABRT in raise() [Merely unchecking the Unity
      plugin is enough to crash Compiz...] (LP: #823386)
    - Launcher - does not hide if revealed from top 24px of the left edge of
      the screen (LP: #835989)
    - Clickable areas of previously active window remains on 'Show Desktop'
      (LP: #836325)
    - Cannot search for some apps in Dash (LP: #837075)
    - Dash - Search box cursor not responding correctly to focus (LP: #839704)
    - Multi-display: Application menu only showing on primary screen
      (LP: #845212)
    - Ellipsized values in size filter (LP: #851359)
    - (oneiric) dash result expansions don't display icons (LP: #854615)
    - run the wrong command if enter is hit before the view is refreshed
      (LP: #856205)
    - Java application windows cut-off/truncated/not displayed properly
      (LP: #857201)
    - compiz crashed with SIGSEGV in sigc::signal_base::impl() (LP: #831769)
    - Minimizing a window should switch focus to the windows underneath it
      (breaks restore) (LP: #859885)
    - Ratings filter allows ratings > 1.0 (LP: #861255)
    - Serious Unity problem stuck in spread when dragging icons back to the
      dash (LP: #862045)
    - Must use hardware keyboard to perform search for applications in Unity
      (LP: #739812)
    - Files lens should also search Downloads (LP: #748915)
    - The dash crosses the monitor boundary when resolution is 1152x864 or
      lesser width (LP: #765338)
    - Dash - dragging a file outside of the Desktop Dash should close the Dash
      (LP: #764641)
    - Text in Dash search text box overflows and doesn't crop with longer
      strings; RtL input starts in wrong place (LP: #834765)
    - Where the average background colour is either very light or dark, adjust
      this value to darken/lighten in order to preserve readability
      (LP: #837993)
    - Dash does not resize when I connect to an external display and mirror
      displays (LP: #83813...


Changed in unity (Ubuntu):
status: Fix Committed → Fix Released
Omer Akram (om26er) on 2011-09-29
Changed in compiz (Ubuntu):
status: Fix Committed → Fix Released
VladimirCZ (vlabla) wrote :

I an sorry to say that the fix is not fully functional. If you have only two windows open lying on the same desktop one over another and not maximized, then minimize the topmost one, then close the remaining one (the second of the two) on your screen and try to un-minimize the first one - it has the focus and cannot be restored. You have to click on the desktop first and then you can restore it.

Aslam Muhammad (aslamckra) wrote :

I confirms with VladimirCZ,
If the last window in the desktop closes, focus should be set to the desktop, NOT to last minimized window.
In addition, the bug is there no matter window is maximized or not.

dart (dart-v85) wrote :

I also confirm this. Steps to reproduce:

1) Open exactly two windows and minimize them to unity launcher.
2) Restore any one window and close it.
3) Result: The other window on Unity launcher cannot be restored to desktop by clicking on its icon on launcher.

Kevin Huang (wasikevin) wrote :

The issue still remains, but the behavior was changed.

Test environment: unity - unity 4.20.0-0ubuntu2

Scenario one

1) Click exactly one application icon in Unity Launcher, Firefox, for example.
2) Minimize Firefox
3) Click Firefox icon in Unity Launcher.
3) Result: Firefox could not be restored.

Scenario two

1) Click two application icons in Unity Launcher, Firefox and Software Center, for example.
2) Minimize Software Center, then Firefox.
3) Click Firefox icon in Unity Launcher.
3) Result: Firefox will be restored.

Aslam Muhammad (aslamckra) wrote :

@ Kevin
To me scenario one and two perfectly restores the firefox,
The problem now is not minimizing it's closing.
the title should be changed as
- Minimizing a window should switch focus to the windows underneath it (breaks restore)
+Closing or Minimizing a window should switch focus to the windows underneath it (breaks restore)

Kevin Huang (wasikevin) wrote :


Yes, you are correct, after I re-installed a new system and verified the issues again.

Rasmus Pedersen (sundowndk) wrote :

I'm experiencing the problem on two separate machines. The bug has been there on and off since Natty.

Dmitry Pankratov (dremon) wrote :

I can confirm the minimizing problem in the latest Unity updates (4.22.0-0ubuntu3).
It is quite easy to reproduce (and very annoying issue in fact).
Attached is a short screencast how to trigger it. I made it with two instances of terminal application but it also works with any other apps.

Franck (alci) wrote :

I can also reproduce here...

geek (igor-boulliev) wrote :

please reopen, unity 4.22.0-0ubuntu3 - bug still here

Géza Búza (medve) wrote :

It is still an issue here (Version: 4.22.0-0ubuntu3).

GT (gio-gda31) wrote :

bug is still here - Version: unity 4.24.0

Marin Bareta (marin-bareta) wrote :

unity version 4.28.0, bug still present.

Omer Akram (om26er) wrote :

no the issue is fixed in Ubuntu 11.10 it may happen when nautilus crashes and is not drawing the desktop.. Or in some rare cases after a Unity crash you may face the issue but for other cases its fixed.

Matt T (matt-fender) wrote :

This issue is not fixed, using Ubuntu 11.10, fresh install brand new hard drive, fully up to date with updates.

Installed unity ver: 4.28.0-0ubuntu2

3.0.0-16-generic #28-Ubuntu SMP Fri Jan 27 17:50:54 UTC 2012 i686 athlon i386 GNU/Linux

Phil Wolff (adiabat) wrote :

No, Omer, Marin and Matt have it right -- the bug definitely exists in unity 4.28.0-0ubuntu2. It's a little disturbing that it has been two weeks since Marin's message and the problem marked "High Importance" is still also marked "Fix Released" when it so obviously is not fixed.

Omer Akram (om26er) wrote :

Matt T, can you login to a guest session and then quickly list here the steps to reproduce the issue please.

I have this same bug in a newly installed Ubuntu 12.04 with all updates.

When i have two windows in maximized mode and minize the first the focus of the buttons that minimize and close a window is still on the one that was minimized but the menu is changed to the one that is shown. If i click on a menu-item the focus changes and i can minimize the windows with the controls as intended.

Daniel van Vugt (vanvugt) wrote :

This bug is marked as Fix Released. If you have any ongoing issues, please report them as new bugs.

cmc302a (cmolina11) wrote :

Buf may be marked as fixed, but it's not. It has been appearing intermittently from release to release. Currently, I am running 12.04 LTS and, as of 06/27/2013, it IS still present.

cmc302a (cmolina11) wrote :

BTW, unity --version is 5.18.00

Distributor ID: Ubuntu
Description: Ubuntu 12.04.2 LTS
Release: 12.04
Codename: precise

kernel is 3.2.0-48-generic

cmc302a (cmolina11) wrote :

Reported new bug.


quequotion (quequotion) wrote :

Marking as duplicate of 1195518, since they have the same symptoms.

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

Other bug subscribers