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 650843 - Modal windows disappear in the overview
Modal windows disappear in the overview
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: overview
3.3.x
Other Linux
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
3.8?
: 691009 691247 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2011-05-23 09:30 UTC by Piotr Drąg
Modified: 2014-01-19 15:41 UTC
See Also:
GNOME target: ---
GNOME version: Unversioned Enhancement


Attachments
workspace: show attached modal dialog in overview (7.74 KB, patch)
2011-06-26 22:04 UTC, Maxim Ermilov
needs-work Details | Review
Workspace: show attached modal dialog (6.15 KB, patch)
2012-08-29 23:02 UTC, Giovanni Campagna
reviewed Details | Review
Workspace: show attached modal dialog (14.11 KB, patch)
2012-10-17 18:09 UTC, Giovanni Campagna
none Details | Review
Workspace: show attached modal dialog (14.40 KB, patch)
2012-10-17 21:32 UTC, Giovanni Campagna
none Details | Review
Workspace: show attached modal dialog (14.59 KB, patch)
2012-10-17 21:39 UTC, Giovanni Campagna
none Details | Review
Workspace: show attached modal dialog (13.26 KB, patch)
2012-10-24 17:27 UTC, Giovanni Campagna
reviewed Details | Review
Workspace: show attached modal dialog (13.22 KB, patch)
2012-11-06 22:36 UTC, Giovanni Campagna
none Details | Review
Workspace: show attached modal dialog (15.15 KB, patch)
2012-11-24 17:59 UTC, Giovanni Campagna
none Details | Review
Worskpace: miscellaneuous cleanups (2.23 KB, patch)
2012-11-24 17:59 UTC, Giovanni Campagna
needs-work Details | Review
WorkspaceThumbnails: show attached modal dialogs togheter with their parents (7.47 KB, patch)
2012-11-24 18:00 UTC, Giovanni Campagna
none Details | Review
Workspace: miscellaneuous cleanups (2.52 KB, patch)
2012-12-17 17:02 UTC, Giovanni Campagna
committed Details | Review
Workspace: show attached modal dialog (15.17 KB, patch)
2013-03-04 16:15 UTC, Giovanni Campagna
committed Details | Review
WorkspaceThumbnails: show attached modal dialogs togheter with their parents (7.51 KB, patch)
2013-03-04 16:15 UTC, Giovanni Campagna
committed Details | Review

Description Piotr Drąg 2011-05-23 09:30:40 UTC
When I enter overview while having any modal window open, it is not shown anymore.
Comment 1 Milan Bouchet-Valat 2011-05-23 11:30:43 UTC
You mean, a modal dialog attached to a parent window? In that case, the fact that the dialog is hidden is by design.
Comment 2 Piotr Drąg 2011-05-23 11:41:47 UTC
Yes. It looks weird when e.g. About dialog suddenly disappears, with no animation or such.
Comment 3 Milan Bouchet-Valat 2011-05-23 11:50:40 UTC
Maybe some kind of animation would make it nicer... Let's see what designers think about that.
Comment 4 William Jon McCann 2011-06-07 20:22:15 UTC
It isn't really by design I think. Seems reasonable to me to show the apps in the overview the way they actually look.
Comment 5 Maxim Ermilov 2011-06-07 20:41:54 UTC
work on it)
Comment 6 Maxim Ermilov 2011-06-26 22:04:12 UTC
Created attachment 190716 [details] [review]
workspace: show attached modal dialog in overview

(depend on patch from Bug 650254)
Comment 7 Dan Winship 2011-06-27 14:32:56 UTC
Comment on attachment 190716 [details] [review]
workspace: show attached modal dialog in overview

>+        this._shouldShowChilds = Meta.prefs_get_attach_modal_dialogs();

I was going to say "you should use meta_window_is_attached_dialog()", but I guess that's not committed yet. So, you should review bug 646761, and then use meta_window_is_attached_dialog().

also, "children", not "childs"
Comment 8 Julien Olivier 2011-08-26 10:07:09 UTC
I noticed recently that Nautilus progress dialog, which is not related to any Nautilus window, is also hidden from the overview. As it is not attached to any Nautilus window, there simply is no way to access it anymore if hidden behind another application window...
Comment 9 Kamil Páral 2011-12-02 10:46:46 UTC
(In reply to comment #8)
> I noticed recently that Nautilus progress dialog, which is not related to any
> Nautilus window, is also hidden from the overview. As it is not attached to any
> Nautilus window, there simply is no way to access it anymore if hidden behind
> another application window...

True, very inconvenient. I'm copying files from one location to another, switch to another application, and then I can't switch back to the progress dialog. The only way how to see it is to close all windows.

However, it does not happen for all Nautilus progress dialogs, just sometimes. I'm not sure what the difference is.
Comment 10 Julien Olivier 2011-12-02 12:32:47 UTC
(In reply to comment #9)
> (In reply to comment #8)
> > I noticed recently that Nautilus progress dialog, which is not related to any
> > Nautilus window, is also hidden from the overview. As it is not attached to any
> > Nautilus window, there simply is no way to access it anymore if hidden behind
> > another application window...
> 
> True, very inconvenient. I'm copying files from one location to another, switch
> to another application, and then I can't switch back to the progress dialog.
> The only way how to see it is to close all windows.
> 
> However, it does not happen for all Nautilus progress dialogs, just sometimes.
> I'm not sure what the difference is.

It seems like it was an Ubuntu bug, and it is fixed now: https://bugs.launchpad.net/ubuntu/+source/nautilus/+bug/868032
Comment 11 Florian Müllner 2012-03-06 12:13:19 UTC
Review of attachment 190716 [details] [review]:

Marking needs-work based on Dan's comment
Comment 12 Giovanni Campagna 2012-08-29 23:02:13 UTC
I hope nobody is offended if take over this bug, as no work has been done since june last year.
Comment 13 Giovanni Campagna 2012-08-29 23:02:48 UTC
Created attachment 222892 [details] [review]
Workspace: show attached modal dialog

Windows in the overview should be like they appear in the workspace,
including modal dialogs that are attached above them.
In addition, hiding the dialogs in the overview causes a flash as
dialog appears at the end of the transition.

Based on a patch by Maxim Ermilov <zaspire@rambler.ru>
Comment 14 Milan Bouchet-Valat 2012-08-30 09:36:19 UTC
Very good initiative! ;-)
Comment 15 drago01 2012-08-31 21:14:06 UTC
Review of attachment 222892 [details] [review]:

Looks good and seems to work fine.

Just have some nitpicks re variable names.

::: js/ui/workspace.js
@@ +141,3 @@
             Lang.bind(this, this._disconnectRealWindowSignals));
 
+	this._childs = [];

childs sounds odd ... "kids" (wouldn't use that though) "children" or "childWindows"

@@ +142,3 @@
 
+	this._childs = [];
+	this.updateChilds();

Same as above.

@@ +189,3 @@
+	    childs.push({ clone: new Clutter.Clone({ source: actor }),
+			  window: actor,
+			  originalPlacing: 1.0,

Placement
Comment 16 drago01 2012-08-31 21:15:14 UTC
Review of attachment 222892 [details] [review]:

::: js/ui/workspace.js
@@ +189,3 @@
+	    childs.push({ clone: new Clutter.Clone({ source: actor }),
+			  window: actor,
+			  originalPlacing: 1.0,

Actually you don't even use that, so just remove it.
Comment 17 Jasper St. Pierre (not reading bugmail) 2012-08-31 21:20:57 UTC
What happens to the close button in cases like:
    _______
   |       |
  _|_______|_
 |           |
 |___________|
   |       |
   |_______|

and

    _______
   |       |
  _|       |_
 | |       | |
 |_|       |_|
   |       |
   |_______|

Where the modal dialog is on top in both cases?
Comment 18 drago01 2012-08-31 21:25:58 UTC
(In reply to comment #17)
> What happens to the close button in cases like:
>     _______
>    |       |
>   _|_______|_
>  |           |
>  |___________|
>    |       |
>    |_______|
> 
> and
> 
>     _______
>    |       |
>   _|       |_
>  | |       | |
>  |_|       |_|
>    |       |
>    |_______|
> 
> Where the modal dialog is on top in both cases?

I didn't think about that but from a quick testing with a resized gnome-terminal and the about dialog on top the close button is just a nop ...
Comment 19 Jasper St. Pierre (not reading bugmail) 2012-10-16 19:26:46 UTC
Giovanni, are you going to finish this one off?
Comment 20 Giovanni Campagna 2012-10-16 21:06:19 UTC
Uhm, I can integrate the code review comments, but I can't answer the design issues you pointed out in comment #17 offhand.
Comment 21 Allan Day 2012-10-17 07:54:52 UTC
(In reply to comment #17)
> What happens to the close button in cases like:
>     _______
>    |       |
>   _|_______|_
>  |           |
>  |___________|
>    |       |
>    |_______|
> 
> and
> 
>     _______
>    |       |
>   _|       |_
>  | |       | |
>  |_|       |_|
>    |       |
>    |_______|
> 
> Where the modal dialog is on top in both cases?

Are we able to make it so that the close button closes both the dialog and the parent window? If yes, then the only solution that I can think of would be to place the close button in the upper right of the combined area of both windows. eg:

     _______ |x|
    |       |
   _|       |_
  | |       | |
  |_|       |_|
    |       |
    |_______|
Comment 22 Julien Olivier 2012-10-17 08:02:49 UTC
> Are we able to make it so that the close button closes both the dialog and the
> parent window? If yes, then the only solution that I can think of would be to
> place the close button in the upper right of the combined area of both windows.
> eg:
> 
>      _______ |x|
>     |       |
>    _|       |_
>   | |       | |
>   |_|       |_|
>     |       |
>     |_______|

If it's not possible to close both at once, maybe the best solution is simply not to show the close button.
Comment 23 Jasper St. Pierre (not reading bugmail) 2012-10-17 13:54:25 UTC
(In reply to comment #21)
> Are we able to make it so that the close button closes both the dialog and the
> parent window?

We can try, of course, but we have the same guarantees as a regular close button: it may not close the window.
Comment 24 Jasper St. Pierre (not reading bugmail) 2012-10-17 13:55:12 UTC
(In reply to comment #21)
> Are we able to make it so that the close button closes both the dialog and the
> parent window?

We can try, of course, but we have the same guarantees as a regular close button: it may not close the window.

The other thing is that it might be a bit awkward unless we make that entire box area reactive. If so, what happens when you simply click on the blank space in the combined area? We zoom to the window?
Comment 25 Allan Day 2012-10-17 15:10:43 UTC
(In reply to comment #24)
> (In reply to comment #21)
> > Are we able to make it so that the close button closes both the dialog and the
> > parent window?
> 
> We can try, of course, but we have the same guarantees as a regular close
> button: it may not close the window.

OK.

> The other thing is that it might be a bit awkward unless we make that entire
> box area reactive. If so, what happens when you simply click on the blank space
> in the combined area? We zoom to the window?

That sounds right. It would help if we fixed bug 665310.
Comment 26 Giovanni Campagna 2012-10-17 18:09:36 UTC
Created attachment 226670 [details] [review]
Workspace: show attached modal dialog

Windows in the overview should be like they appear in the workspace,
including modal dialogs that are attached above them.
In addition, hiding the dialogs in the overview causes a flash as
dialog appears at the end of the transition.

Based on a patch by Maxim Ermilov <zaspire@rambler.ru>

Heavily reworked to handle correctly dialogs that are outside of their
parent. Now the bounding box of the window + children is taken and scaled
as a unit.
Comment 27 Giovanni Campagna 2012-10-17 21:32:06 UTC
Created attachment 226696 [details] [review]
Workspace: show attached modal dialog

Windows in the overview should be like they appear in the workspace,
including modal dialogs that are attached above them.
In addition, hiding the dialogs in the overview causes a flash as
dialog appears at the end of the transition.

Based on a patch by Maxim Ermilov <zaspire@rambler.ru>

Fixed the scaling of non-maximized windows (so that interaction
with the highlight patch is now working) and fixed crash with scroll-to-zoom.
Comment 28 Giovanni Campagna 2012-10-17 21:39:37 UTC
Created attachment 226698 [details] [review]
Workspace: show attached modal dialog

Windows in the overview should be like they appear in the workspace,
including modal dialogs that are attached above them.
In addition, hiding the dialogs in the overview causes a flash as
dialog appears at the end of the transition.

Based on a patch by Maxim Ermilov <zaspire@rambler.ru>
Comment 29 Giovanni Campagna 2012-10-24 17:27:52 UTC
Created attachment 227181 [details] [review]
Workspace: show attached modal dialog

Windows in the overview should be like they appear in the workspace,
including modal dialogs that are attached above them.
In addition, hiding the dialogs in the overview causes a flash as
dialog appears at the end of the transition.

Based on a patch by Maxim Ermilov <zaspire@rambler.ru>

Rebased on the new window layout code.
Comment 30 Jasper St. Pierre (not reading bugmail) 2012-11-06 20:45:05 UTC
Review of attachment 227181 [details] [review]:

.oO ( At some point, I think we're going to have to do something about the stex including the padding -- I had my proposal for multiple MetaWindowActors, which I still want to persue, but it just needs completing. Let's not block this on that, it's just some internal notes I have )

::: js/ui/workspace.js
@@ +137,3 @@
+        let clone = container._delegate;
+
+        clone._windowClone.allocate(this._makeBoxForWindow(clone.metaWindow),

Given that you pass over all the children of the container eventually AFAICT, why not just iterate over the children here?

@@ +172,3 @@
+        // As usual, we cannot use a ShellGenericContainer or StWidget here,
+        // because Workspace plays dirty tricks with reparenting to do DNDs
+        // and scroll-to-zoom.

We're going to need to fix this reparenting garbage sooner or later.

@@ +174,3 @@
+        // and scroll-to-zoom.
+        this.actor = new Clutter.Actor({ reactive: true,
+                                         layout_manager: new WindowCloneLayout });

()

@@ +268,3 @@
+                child.clone.destroy();
+
+                this._children = this._children.filter(function(a) {

this._children.splice(this._children.indexOf(child), 1);
Comment 31 Giovanni Campagna 2012-11-06 22:31:06 UTC
(In reply to comment #30)
> Review of attachment 227181 [details] [review]:
> [...]
>
> ::: js/ui/workspace.js
> @@ +137,3 @@
> +        let clone = container._delegate;
> +
> +        clone._windowClone.allocate(this._makeBoxForWindow(clone.metaWindow),
> 
> Given that you pass over all the children of the container eventually AFAICT,
> why not just iterate over the children here?

Because the way to access metaWindow is different (clone is not an actor here, is a WindowClone, and child is a JS object holding the actor and the window)
Comment 32 Giovanni Campagna 2012-11-06 22:36:22 UTC
Created attachment 228319 [details] [review]
Workspace: show attached modal dialog

Windows in the overview should be like they appear in the workspace,
including modal dialogs that are attached above them.
In addition, hiding the dialogs in the overview causes a flash as
dialog appears at the end of the transition.

Based on a patch by Maxim Ermilov <zaspire@rambler.ru>

Just noticed: there is a weird effect when dragging a window with
modal: dragging to the workspace switcher, the window has modals, but
they disappear once you relase. Opposite behavior when dragging from.
My opinion is that we should show modals in the workspace thumbnails
too.
Comment 33 Allan Day 2012-11-08 08:54:22 UTC
(In reply to comment #32)
> Just noticed: there is a weird effect when dragging a window with
> modal: dragging to the workspace switcher, the window has modals, but
> they disappear once you relase. Opposite behavior when dragging from.
> My opinion is that we should show modals in the workspace thumbnails
> too.

I agree.
Comment 34 Xavier Claessens 2012-11-12 16:01:25 UTC
(In reply to comment #32)
> Just noticed: there is a weird effect when dragging a window with
> modal: dragging to the workspace switcher, the window has modals, but
> they disappear once you relase. Opposite behavior when dragging from.
> My opinion is that we should show modals in the workspace thumbnails
> too.

Is this considered blocker for merging the patch? Are you still working on this bug, or could I help?
Comment 35 Giovanni Campagna 2012-11-19 18:27:27 UTC
I don't have code to implement the second part right now, so I guess you could build a second patch on top of mine. Also, I don't think it is a blocker, as this is an improvement on its own.
Comment 36 Giovanni Campagna 2012-11-24 17:58:47 UTC
Ok, I started to work on this now. Hope I didn't step on anyone toes...
Comment 37 Giovanni Campagna 2012-11-24 17:59:33 UTC
Created attachment 229776 [details] [review]
Workspace: show attached modal dialog

Windows in the overview should be like they appear in the workspace,
including modal dialogs that are attached above them.
In addition, hiding the dialogs in the overview causes a flash as
dialog appears at the end of the transition.

Based on a patch by Maxim Ermilov <zaspire@rambler.ru>

Heavily refactored, should now handle modal dialogs that appear while
the overview is open.
Comment 38 Giovanni Campagna 2012-11-24 17:59:53 UTC
Created attachment 229777 [details] [review]
Worskpace: miscellaneuous cleanups

Use a single GSettings object for all layout changes of window overlays,
and avoid quadratic behavior for window positioning.
Comment 39 Giovanni Campagna 2012-11-24 18:00:03 UTC
Created attachment 229778 [details] [review]
WorkspaceThumbnails: show attached modal dialogs togheter with their parents

The window clones in the central part of the overview are showing modal
dialogs now, and this creates an inconsistency if the thumbnail doesn't too.
Code is intentionally similar in the two places.
Comment 40 Jasper St. Pierre (not reading bugmail) 2012-12-17 00:29:55 UTC
Review of attachment 229777 [details] [review]:

::: js/ui/workspace.js
@@ +1325,3 @@
             let metaWindow = clone.metaWindow;
+            let overlay = clone.overlay;
+            clone.slotId = i;

This is not part of the cleanup AFAICT.

@@ +1730,2 @@
     _addWindowClone : function(win) {
         let clone = new WindowClone(win, this);

WindowClone needs this.overlay = null; in the constructor.
Comment 41 Giovanni Campagna 2012-12-17 17:02:59 UTC
Created attachment 231741 [details] [review]
Workspace: miscellaneuous cleanups

Use a single GSettings object for all layout changes of window overlays,
and avoid quadratic behavior for window positioning.
Comment 42 Jasper St. Pierre (not reading bugmail) 2012-12-17 22:14:33 UTC
Review of attachment 231741 [details] [review]:

OK.
Comment 43 Giovanni Campagna 2012-12-18 15:05:20 UTC
Comment on attachment 231741 [details] [review]
Workspace: miscellaneuous cleanups

Attachment 231741 [details] pushed as d479c93 - Workspace: miscellaneuous cleanups
Comment 44 Giovanni Campagna 2013-01-02 16:59:34 UTC
*** Bug 691009 has been marked as a duplicate of this bug. ***
Comment 45 Giovanni Campagna 2013-01-04 18:11:09 UTC
One month review ping!
This is an EDM bug.
Comment 46 Florian Müllner 2013-01-08 10:57:06 UTC
*** Bug 691247 has been marked as a duplicate of this bug. ***
Comment 47 Giovanni Campagna 2013-02-15 22:40:25 UTC
Will we get this in, before UI freeze?
Comment 48 drago01 2013-03-04 09:12:11 UTC
(In reply to comment #47)
> Will we get this in, before UI freeze?

We missed the freeze so we'd need an exception ... can you rebase the patches?
Comment 49 Giovanni Campagna 2013-03-04 16:15:07 UTC
Created attachment 238007 [details] [review]
Workspace: show attached modal dialog

Windows in the overview should be like they appear in the workspace,
including modal dialogs that are attached above them.
In addition, hiding the dialogs in the overview causes a flash as
dialog appears at the end of the transition.

Based on a patch by Maxim Ermilov <zaspire@rambler.ru>
Comment 50 Giovanni Campagna 2013-03-04 16:15:23 UTC
Created attachment 238008 [details] [review]
WorkspaceThumbnails: show attached modal dialogs togheter with their parents

The window clones in the central part of the overview are showing modal
dialogs now, and this creates an inconsistency if the thumbnail doesn't too.
Code is intentionally similar in the two places.
Comment 51 drago01 2013-03-04 16:46:06 UTC
Review of attachment 238007 [details] [review]:

Still does not apply so only reviewed the code which looks good modulo minor c&p issue.

::: js/ui/workspace.js
@@ +94,3 @@
+            let realWindow;
+
+            let realWindow;

One "let realWindow" is enough.
Comment 52 drago01 2013-03-04 16:47:30 UTC
Review of attachment 238008 [details] [review]:

Code looks good, but didn't test it.
Comment 53 Giovanni Campagna 2013-03-04 16:51:30 UTC
(In reply to comment #51)
> Review of attachment 238007 [details] [review]:
> 
> Still does not apply so only reviewed the code which looks good modulo minor
> c&p issue.

That's weird, they're straight on master. Well, grab wip/gcampax/modal-dialogs if you want to test them.
Comment 54 Florian Müllner 2013-03-04 16:59:21 UTC
The first patch seems to work fine, but in the workspace switcher I can *only* see the attached modal ...
(Also the code looks like it could be simplified very much if dnd between workspace thumbnails is dropped as requested in 686984 ...)
Comment 55 Giovanni Campagna 2013-03-04 17:10:39 UTC
Weird, it works fine here...
Comment 56 drago01 2013-03-04 20:37:58 UTC
Review of attachment 238008 [details] [review]:

OK now I have tested this ...

Two issues:

1) I can drag the modal dialog away from its parent (when dragging the window from the thumbnails).
2) During DND the clone is not positioned at the cursor actually the thumbnail from the window picker gets moved instead which is very weird ...
Comment 57 Giovanni Campagna 2013-03-04 21:01:38 UTC
2) is not a regression, I can reproduce the same weirdness on master too. And it will be fixed when we stop dragging thumbnails.

On the other hand, the clipping problem (mixing clones and effects) resurfaced, causing the issue Florian mentions in comment #54, so I'm wary of pushing this to 3.8.
We'll prepare the right fix for 3.10.
Comment 58 Jasper St. Pierre (not reading bugmail) 2013-04-02 04:23:07 UTC
Not sure this is 3.8.1 material.
Comment 59 drago01 2013-04-02 06:49:35 UTC
(In reply to comment #58)
> Not sure this is 3.8.1 material.

Its not. Changes are too invasive for that.
Comment 60 Giovanni Campagna 2013-04-02 13:16:27 UTC
(In reply to comment #59)
> (In reply to comment #58)
> > Not sure this is 3.8.1 material.
> 
> Its not. Changes are too invasive for that.

I agree. We might even miss 3.10, if we don't fix the ClutterEffect bug, and apparently noone has a clue...
Comment 61 Giovanni Campagna 2013-04-02 13:17:48 UTC
I forgot to add: not using a ClutterClone (MetaWindowActor everywhere) or not using a ClutterOffscreenEffect (and shading the window texture directly) would sidestep the problem.
Comment 62 Allan Day 2013-08-26 00:06:38 UTC
*** Bug 673399 has been marked as a duplicate of this bug. ***
Comment 63 Allan Day 2013-08-29 00:52:49 UTC
Reassigning. Sorry for the noise.
Comment 64 Giovanni Campagna 2014-01-19 15:40:30 UTC
Pushed, because this bug has been open for too long. No real progress is
possible here, so I pushed also a patch that removes the dimming in the
overview  (as a separate, revertable, commit).
Code has been reviewed, and has been tested by me for several releases now.

Attachment 238007 [details] pushed as 587655f - Workspace: show attached modal dialog
Attachment 238008 [details] pushed as 8b99617 - WorkspaceThumbnails: show attached modal dialogs togheter with their parents