Ubuntu

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

Reported by Rocko on 2011-06-28
108
This bug affects 21 people
Affects Status Importance Assigned to Milestone
Ayatana Design
High
John Lea
Compiz
Undecided
Unassigned
Compiz Core
Undecided
Unassigned
Unity
High
Marco Trevisan (Treviño)
compiz (Ubuntu)
Undecided
Unassigned
Precise
Undecided
Unassigned
unity (Ubuntu)
High
Marco Trevisan (Treviño)
Precise
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

lp:~3v1n0/unity/focused-non-top-windows-fix
Merged into lp:unity at revision 2344
Tim Penhey (community): Approve on 2012-04-26
Alex Launi (community): Needs Fixing (quality) on 2012-04-25
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

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
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
Didier Roche (didrocks) on 2011-07-29
Changed in unity:
status: New → Confirmed
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.

Timo Jyrinki (timo-jyrinki) wrote :

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

John Lea (johnlea) on 2012-02-23
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) on 2012-04-22
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) on 2012-04-26
Changed in unity (Ubuntu Precise):
importance: Undecided → High
status: Fix Committed → Confirmed
Didier Roche (didrocks) on 2012-04-27
Changed in unity:
status: Fix Committed → Fix Released

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
Rocko (rockorequin) wrote :

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

tags: added: verification-done
removed: verification-needed
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.

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
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
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.

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
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

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
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
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) on 2012-10-12
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) on 2013-07-24
Changed in compiz:
milestone: 0.9.10.0 → 0.9.11.0
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers