Window management - unity doesn't realise when applications bring their windows to the front

Bug #802816 reported by Rocko
108
This bug affects 21 people
Affects Status Importance Assigned to Milestone
Ayatana Design
Fix Released
High
John Lea
Compiz
Confirmed
Undecided
Unassigned
Compiz Core
Confirmed
Undecided
Unassigned
Unity
Fix Released
High
Marco Trevisan (Treviño)
compiz (Ubuntu)
Confirmed
Undecided
Unassigned
Precise
Won't Fix
Undecided
Unassigned
unity (Ubuntu)
Fix Released
High
Marco Trevisan (Treviño)
Precise
Fix Released
High
Marco Trevisan (Treviño)

Bug Description

To reproduce:

1. Run Firefox.
2. Run Synaptic (non-maximized) and select a program to install or to reinstall.
3. Click Apply and OK to install/reinstall the program and then while Synaptic is downloading, click on Firefox to bring the Firefox window to the front.
4. When Synaptic finishes downloading and starts installing, it brings its window and dialog back to the front, ie in front of Firefox's window.
5. Click on either the part of the Firefox window visible behind Synaptic or on the Firefox icon in unity-launcher to try and restore to the front.

Result: nothing happens. Unity does not bring Firefox's window back to the front, presumably because unity still thinks Firefox is the current application/front window.

The only workaround I've found is to click on the Synaptic window or its unity-launcher icon and then to click on Firefox to bring it back to the front.

A second way of reproducing this, if there is a system update for which the list of changes is not yet available, is:

1. Run Firefox and minimize it.
2. Run update-manager and find an update that has an http link for the updates, ie where it says "The list of changes is not available yet. Please use...".
3. Click on the link. Firefox will be brought to the front, obscuring update-manager, but unity-launcher will have a blue arrow next to Firefox's icon to indicate that it needs attention.
4. Click on update-manager's icon in unity-launcher to bring it back to the front.

Result: nothing happens. Unity thinks update-manager is already the front window.

-----------------------------------------------------------------

Steps to reproduce:
 * You need to use some app that gets automatically sent to the front at some moment, like Update Manager or Synaptic. Start updating or installing packages.
 * While Update Manager is downloading, use another app, say Firefox.
 -> At some point, Update Manager gets automatically sent to the front (while updating the cache or starting to install).

Observed behaviour:
 * The unfocused Update Manager window is in front of Firefox (the global menu still shows the menu of Firefox)
 * Clicking on the Firefox window (if visible) or on the Firefox icon in the launcher (if Update Manager or Synaptic is fullscreen) does NOT bring it back to the front.
 * You have to focus the Update Manager window, then click on the Firefox one to put it to the front.

-----------------------------------------------------------------

Another simple way to reproduce this:
 * Open GIMP
 * Open a terminal Window
 * From the terminal window run the command "gimp foo-image.png"
 * A gimp dialog will be raised, but not focused
 * Clicking on the launcher's terminal icon won't raise the terminal

-----------------------------------------------------------------

Desired resolution:

- if an active window is behind another (that is not pinned-to-front) window, any action on it (and a click on its launcher icon) should bring it to the front

Related branches

Revision history for this message
Rocko (rockorequin) wrote :
summary: - unity doesn't realise when other applications bring their windows to the
- front
+ unity doesn't realise when applications bring their windows to the front
Revision history for this message
Rocko (rockorequin) wrote : Re: unity doesn't realise when applications bring their windows to the front

In case it is relevant, I should add that I typically run both Synaptic and update-manager from a gnome-terminal using sudo.

description: updated
Revision history for this message
Sven K. (wagalaweia) wrote :

I just wanted to post a similar problem, but I see that it is based on the same problem described here. However, it might be even easier to reproduce this way:

#### A special test case:
1. currently, your browser window is opened (usually maximized)
2. start another application, e.g., by clicking on its dash icon, which needs some time to create and display its window (usually maximized), e.g., Thunderbird, eclipse, USC, ... whatever
3. immediately after starting the other application, click again into your browser window (or its dash icon) to give it the focus back
4. wait until the other window appears. It is shown above the browser window
5. now, you want to make the browser visible again, so click on the browser's icon in the dash. You will see, you cannot bring the browser window to front by this! You have to use Alt+Tab or you must click another icon first, and then your browser's icon again

#### General problem description:
The problem seems to be, that when clicking on an dash icon referring to an application that currently has the focus, its window is not moved to front again. It is only moved to front, when it did not have the focus before clicking on its icon.

#### Easiest Solution:
Whenever a dash icon is clicked, its associated window (incl. any child windows) should be moved to front (again), regardless of whether it had the focus before or not, or whether or not it was in the front before or not.

Changed in unity (Ubuntu):
status: New → Confirmed
Changed in unity:
status: New → Confirmed
Revision history for this message
Timo Jyrinki (timo-jyrinki) wrote :

Marked bug #860637 as duplicate of this one. I'm seeing this on precise - when the Synaptic comes to the top, it's not possible to switch back to Firefox, for example with super + number. One needs to actually switch or start some other program before it's possible to switch back to the original program that was on top before Synaptic put itself on top.

Sam Spilsbury had commented in bug #860637 that "Assigning me, but I'm pretty sure I fixed this last week, please try compiz from -proposed" and had had no answer. It might be that the problem was not fixed originally or it has now resurfaced.

Revision history for this message
Timo Jyrinki (timo-jyrinki) wrote :

(the duplicate bug was Importance "High" in Ayatana Design)

John Lea (johnlea)
description: updated
Changed in ayatana-design:
assignee: nobody → John Lea (johnlea)
importance: Undecided → High
status: New → Triaged
Changed in unity:
milestone: none → backlog
tags: added: udp
summary: - unity doesn't realise when applications bring their windows to the front
+ Window management - unity doesn't realise when applications bring their
+ windows to the front
description: updated
Changed in unity:
importance: Undecided → High
Changed in unity (Ubuntu):
assignee: nobody → Marco Trevisan (Treviño) (3v1n0)
Changed in unity:
assignee: nobody → Marco Trevisan (Treviño) (3v1n0)
Changed in unity:
milestone: backlog → 5.12.0
status: Confirmed → In Progress
Changed in unity (Ubuntu):
status: Confirmed → In Progress
Tim Penhey (thumper)
Changed in ayatana-design:
status: Triaged → Fix Committed
Changed in unity:
status: In Progress → Fix Committed
Changed in unity (Ubuntu):
status: In Progress → Fix Committed
Omer Akram (om26er)
Changed in unity (Ubuntu Precise):
importance: Undecided → High
status: Fix Committed → Confirmed
Changed in unity:
status: Fix Committed → Fix Released
Revision history for this message
Martin Pitt (pitti) wrote : Please test proposed package

Hello Rocko, or anyone else affected,

Accepted unity into precise-proposed. The package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

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

It looks like it's fixed for me, thanks.

tags: added: verification-done
removed: verification-needed
Revision history for this message
Rocko (rockorequin) wrote :

This bug has returned. I'm currently running 5.12-0ubuntu1 and I've seen this happen now with both update-manager and synaptic.

Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (6.0 KiB)

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

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

  * New upstream release.
    - Launcher, Alt-Tab - clicking on launcher item or selecting a app in Alt-
      Tab raises all app windows, not just most recently focused (LP: #959339)
    - [heap corruption?] compiz crashed with SIGSEGV in _int_malloc() from
      g_realloc() from ... from g_dbus_connection_send_message_with_reply()
      from g_object_unref() from unity::dash::HomeLens::Impl::~Impl() from
      unity::dash::HomeLens::~HomeLens() (LP: #931201)
    - compiz crashed with SIGSEGV in _int_malloc() from __libc_calloc() from
      XOpenDisplay() from nux::WindowThread::ThreadCtor() (LP: #947844)
    - Regression: Installing apps causes a terrible visual glitch-- have to
      restart X.org. (LP: #981168)
    - Window management - unity doesn't realise when applications bring their
      windows to the front (LP: #802816)
    - Dash - Clicking on the desktop dash border should do nothing, *NOT*
      close the dash (LP: #839472)
    - [FFe, UIFe] HUD - The HUD does not respect launcher icon size settings
      in autohide mode (LP: #921506)
    - compiz crashed with SIGSEGV in g_volume_get_mount() (LP: #918548)
    - multiple instances or double icons of application detected on bamfdaemon
      respawn (LP: #928912)
    - Panel is transparent when Dash is open; no blur no average BG color
      (LP: #965323)
    - Unity crashes with SIGSEGV when hitting debug DBus interface hard
      (LP: #979429)
    - compiz crashed with SIGSEGV in _int_malloc() from g_object_unref() from
      unity::dash::Model<unity::dash::FilterAdaptor>::~Model() (LP: #941750)
    - indicators menu are sometimes cut off at screen edge (LP: #883317)
    - the shortcut keys in workspace section of the shortcut overlay aren't
      translated (LP: #980828)
    - [regression] Dash keeps repainting unnecessarily (LP: #980924)
    - compiz crashed with SIGSEGV in nux::NTextureData::ClearData() from
      nux::NTextureData::~NTextureData() from nux::Texture2D::~Texture2D()
      (LP: #952378)
    - compiz crashed with SIGSEGV in g_object_unref() from
      unity::dash::Settings::~Settings() from
      unity::UnityScreen::~UnityScreen() (LP: #981764)
    - compiz crashed with SIGSEGV in unity::dash::ResultView::~ResultView()
      from unity::dash::ResultViewGrid::~ResultViewGrid() from
      nux::Object::Destroy() from nux::Object::UnReference() (LP: #942286)
    - compiz crashed with SIGSEGV in
      ends_with_iter_select<__gnu_cxx::__normal_iterator<char const*,
      std::basic_string<char> >, char const*, boost::algorithm::is_iequal>()
      from unity::ui::PointerBarrierWrapper::EmitCurrentData() (LP: #983268)
    - Chinese can't be shown completely in dash filter (LP: #984583)
    - [Unity 5.10] compiz crashed with SIGSEGV in
      unity::hud::HudIconTextureSource::ColorForIcon() from
      unity::hud::Icon::Icon() from emit from unity::IconTexture::IconLoaded
      (LP: #983646)
    - [regression] Close button does not close the dash/HUD (LP: #986264)
    - compiz crashed with SIGSEGV in g_volume_eject_with_operation_finish()
      fro...

Read more...

Changed in unity (Ubuntu):
status: Confirmed → Fix Released
Changed in unity (Ubuntu Precise):
status: Fix Committed → Fix Released
Revision history for this message
Rocko (rockorequin) wrote :

Changing status to new because the bug is no longer fixed - I can reproduce it in unity 5.12-0ubuntu1.

Could it be a compiz issue instead of a unity issue? I'm running compiz 1:0.9.7.8-0ubuntu1.

Changed in unity:
status: Fix Released → New
Revision history for this message
BeowulfOF (beowulfof) wrote :

Seems I missed something. I did not recognize any change since subscribed to this bug. Window management is still unexpected as before the patch.

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

The fix is related to the launcher, not to the window management, that needs a new bug.
The launcher issue is fixed.

Changed in unity:
status: New → Fix Released
Revision history for this message
Rocko (rockorequin) wrote :

Marco - this bug is about the window management and is not related to the launcher, so if the fix you refer to is related to the launcher, this bug is not fixed.

Changed in unity:
status: Fix Released → Confirmed
Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :

So, the problem is in compiz, not in Unity.

Changed in unity:
status: Confirmed → Fix Released
Changed in compiz-core:
status: New → Confirmed
milestone: none → 0.9.7.10
Changed in compiz-core:
milestone: 0.9.7.10 → 0.9.8.0
Revision history for this message
Rocko (rockorequin) wrote :

The oddest thing is that this bug *was* fixed when I tested for it in comment #11, but it is back again.

Changed in compiz:
status: New → Confirmed
Changed in compiz:
milestone: none → 0.9.8.0
Changed in compiz-core:
milestone: 0.9.8.0 → none
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in compiz (Ubuntu Precise):
status: New → Confirmed
Changed in compiz (Ubuntu):
status: New → Confirmed
Changed in compiz:
milestone: 0.9.8.0 → 0.9.8.1
Changed in compiz:
milestone: 0.9.8.2 → 0.9.8.4
Changed in compiz:
milestone: 0.9.8.4 → 0.9.9.0
John Lea (johnlea)
Changed in ayatana-design:
status: Fix Committed → Fix Released
tags: added: reviewedbydesignp
removed: udp unity-2d
Changed in compiz:
milestone: 0.9.9.0 → 0.9.9.2
Changed in compiz:
milestone: 0.9.9.2 → 0.9.10.0
MC Return (mc-return)
Changed in compiz:
milestone: 0.9.10.0 → 0.9.11.0
Revision history for this message
Steve Langasek (vorlon) wrote :

The Precise Pangolin has reached end of life, so this bug will not be fixed for that release

Changed in compiz (Ubuntu Precise):
status: Confirmed → Won't Fix
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.