After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 632007 - mis-stacking of attached dialogs
mis-stacking of attached dialogs
Product: mutter
Classification: Core
Component: general
Other Linux
: Normal normal
: ---
Assigned To: mutter-maint
: 644842 (view as bug list)
Depends on:
Reported: 2010-10-12 19:35 UTC by Dan Winship
Modified: 2021-07-05 13:44 UTC
See Also:
GNOME target: ---
GNOME version: ---

stack: if attach_modal_dialogs enabled, place modal dialog near parent (1.63 KB, patch)
2011-03-16 01:40 UTC, Maxim Ermilov
needs-work Details | Review
Test program (939 bytes, text/x-csrc)
2011-03-22 02:24 UTC, Owen Taylor

Description Dan Winship 2010-10-12 19:35:00 UTC
the packagekit icon was yelling at me, so I opened it up, clicked the "install updates" (or whatever it is) button, and then minimized the window and went back to what I was doing. When the updates finished installing, packagekit presented a modal dialog saying it was done, which also unminimized its main window. However, the main window got focus-stealing-prevented from restacking itself over the terminal window I was using, *but the "attached" dialog didn't. So I had packagekit's modal dialog floating over my terminal window, with packagekit's window underneath the terminal.
Comment 1 Dan Winship 2011-03-15 19:47:46 UTC
*** Bug 644842 has been marked as a duplicate of this bug. ***
Comment 2 Maxim Ermilov 2011-03-16 01:40:23 UTC
Created attachment 183481 [details] [review]
stack: if attach_modal_dialogs enabled, place modal dialog near parent
Comment 3 Rui Matos 2011-03-21 18:48:14 UTC
(In reply to comment #2)
> Created an attachment (id=183481) [details] [review]
> stack: if attach_modal_dialogs enabled, place modal dialog near parent

Fixes the situation I reported in bug 644842.
Comment 4 Owen Taylor 2011-03-22 02:24:41 UTC
Created attachment 184030 [details]
Test program

Here's a test program I used, to reproduce the problem, start this program then raise two windows above it in quick succession before the dialog shows up - the stacking will be, bottom to top:

 stack.c parent window
 first raised window 
 stack.c dialog
 second raised window
Comment 5 Owen Taylor 2011-03-22 02:39:10 UTC
Review of attachment 183481 [details] [review]:


 - If two windows are both transient for each other, this patch will go into an infinite loop.
 - Patch doesn't do the right thing for parent/child/grandchild relationships since it can encounter them in any order, it might move the grandchild next to the child, then move the child away next to the parent

would like to see this tested against test cases for both things before this lands. Also, would like to see a test case for what happens if the parent and dialog are in different layers. I guess this effectively squashes the layer of the dialog to the layer of the parent it is attached to, which is probably OK.
Comment 6 Jonas Ådahl 2018-02-01 07:03:58 UTC
This is still an issue in 3.27.
Comment 7 GNOME Infrastructure Team 2021-07-05 13:44:00 UTC
GNOME is going to shut down in favor of
As part of that, we are mass-closing older open tickets in
which have not seen updates for a longer time (resources are unfortunately
quite limited so not every ticket can get handled).

If you can still reproduce the situation described in this ticket in a recent
and supported software version, then please follow
and create a new ticket at

Thank you for your understanding and your help.