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 679500 - Clean up overview code, don't use Clutter.Clone, show OR windows in the overview
Clean up overview code, don't use Clutter.Clone, show OR windows in the overview
Status: RESOLVED OBSOLETE
Product: gnome-shell
Classification: Core
Component: overview
unspecified
Other All
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2012-07-06 08:20 UTC by Jasper St. Pierre (not reading bugmail)
Modified: 2021-07-05 14:19 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
overview: Don't fade out the Nautilus desktop window (3.10 KB, patch)
2012-07-06 08:20 UTC, Jasper St. Pierre (not reading bugmail)
rejected Details | Review
Stop using the overlay group (8.38 KB, patch)
2012-07-06 08:20 UTC, Jasper St. Pierre (not reading bugmail)
needs-work Details | Review
overview: Only show/hide non-override-redirect windows in the overview (1.36 KB, patch)
2012-07-06 08:20 UTC, Jasper St. Pierre (not reading bugmail)
needs-work Details | Review
windowManager: Remove unused function (837 bytes, patch)
2012-07-06 08:20 UTC, Jasper St. Pierre (not reading bugmail)
committed Details | Review
windowManager: Don't play awful reparenting hacks with actors (4.33 KB, patch)
2012-07-06 08:20 UTC, Jasper St. Pierre (not reading bugmail)
needs-work Details | Review
workspace: Stop using Clutter.Clone to display an X window (4.88 KB, patch)
2012-07-06 08:20 UTC, Jasper St. Pierre (not reading bugmail)
needs-work Details | Review
xdndHandler: Stop using Clutter.Clone to display an X window (1.38 KB, patch)
2012-07-06 08:20 UTC, Jasper St. Pierre (not reading bugmail)
needs-work Details | Review
altTab: Stop using Cluttrer.Clone to display an X window (1.82 KB, patch)
2012-07-06 08:20 UTC, Jasper St. Pierre (not reading bugmail)
needs-work Details | Review

Description Jasper St. Pierre (not reading bugmail) 2012-07-06 08:20:02 UTC
Lots of fancy stuff in this patch stack. I'm including it as one bug and patch stack because that's the easiest way to go about it. I don't want to make the same mistake I did with the initial SweetTooth extension madness with 20 different bugs :)

Anyway, so, this patch does a few things:

 * It cleans up a lot of code in the overview and removes dead code.

 * Removes old concepts like the overlay_group, which we can now remove.

 * It makes OR windows visible in the overview. We might want to make this triggered by a special X property instead of including all OR windows. Something that might use this would include applications like grommit, or a special OSD window. There's plenty of other use cases for this behaviour, too.

 * Removes ClutterClone and reparenting hacks, and swaps them out with new Meta.WindowActors created in the Shell itself.

This patch stack relies on the patches in bug #678989.
Comment 1 Jasper St. Pierre (not reading bugmail) 2012-07-06 08:20:05 UTC
Created attachment 218155 [details] [review]
overview: Don't fade out the Nautilus desktop window

Instead, let it just drop to the floor like the rest of the other
windows. We do not support using Nautilus with gnome-shell.
Comment 2 Jasper St. Pierre (not reading bugmail) 2012-07-06 08:20:08 UTC
Created attachment 218156 [details] [review]
Stop using the overlay group

If we want to display override-redirect windows in the overview, we need
to ensure that they are able to be sorted correctly, so that the window
group appears on top of the overview. To ensure this, stop adding the
overview to an overlay group, and instead add it directly to the uiGroup.

Additionally, fix up some other cases where we add things directly to
the overlay group where we should be adding it to the uiGroup.
Comment 3 Jasper St. Pierre (not reading bugmail) 2012-07-06 08:20:10 UTC
Created attachment 218157 [details] [review]
overview: Only show/hide non-override-redirect windows in the overview
Comment 4 Jasper St. Pierre (not reading bugmail) 2012-07-06 08:20:13 UTC
Created attachment 218158 [details] [review]
windowManager: Remove unused function
Comment 5 Jasper St. Pierre (not reading bugmail) 2012-07-06 08:20:16 UTC
Created attachment 218159 [details] [review]
windowManager: Don't play awful reparenting hacks with actors

Create a new WindowActor for the MetaWindow rather than doing
this awful mess.
Comment 6 Jasper St. Pierre (not reading bugmail) 2012-07-06 08:20:19 UTC
Created attachment 218160 [details] [review]
workspace: Stop using Clutter.Clone to display an X window
Comment 7 Jasper St. Pierre (not reading bugmail) 2012-07-06 08:20:22 UTC
Created attachment 218161 [details] [review]
xdndHandler: Stop using Clutter.Clone to display an X window
Comment 8 Jasper St. Pierre (not reading bugmail) 2012-07-06 08:20:25 UTC
Created attachment 218162 [details] [review]
altTab: Stop using Cluttrer.Clone to display an X window
Comment 9 Florian Müllner 2012-07-06 13:28:20 UTC
Review of attachment 218155 [details] [review]:

No. The option is still present and I'm not aware of any plans to remove it. It is not default and we discourage using it, but that doesn't mean we should remove support in gnome-shell (if "non-default" and "discouraged" were enough reason to remove features, the extension system was first to go)
Comment 10 Florian Müllner 2012-07-06 13:28:54 UTC
Review of attachment 218156 [details] [review]:

Looks mostly good, except for some minor comments and some breakage.

::: js/ui/overview.js
@@ +111,3 @@
+        this.actor = new St.Widget();
+        Main.uiGroup.add_actor(this.actor);
+        this.actor.lower(global.window_group);

Unrelated to this patch

::: js/ui/workspacesView.js
@@ +479,3 @@
         this.actor.set_clip_to_allocation(true);
 
+        this._fakeGroup = new St.Widget();

What is a "fake group"? I think the code would be less confusing if you just used Main.overview.actor ...

@@ +846,3 @@
+                        let fakeGroup = this._fakeGroup;
+                        fakeGroup.opacity = opacity;
+                        fakeGroup.visible = opacity != 0;

This is neither what the comment says nor what the code is supposed to be doing (in other words: you are breaking stuff).
Comment 11 Florian Müllner 2012-07-06 13:29:37 UTC
Review of attachment 218157 [details] [review]:

I'm really not sure it is a good idea to allow random UI in the overview - IMO it is system space and not something applications should be able to mess with (more so as applications don't have any means to determine the location of system elements, so they could end up covering anything). The only valid use case I can think of are g-s-d's OSDs, which are system UI as well - but as such, I'd rather see the UI code move into the shell than opening this can of worms ...

So let's get design input here first - marking needs-work, because the patch is broken anyway.

::: js/ui/overview.js
@@ +572,3 @@
+        global.get_window_actors().forEach(function(w) {
+            if (!w.is_override_redirect())
+                w.hide();

It's not that simple. Hint: try switching workspaces while in the overview ...
Comment 12 Florian Müllner 2012-07-06 13:31:01 UTC
Review of attachment 218158 [details] [review]:

Sure.
Comment 13 Florian Müllner 2012-07-06 13:32:07 UTC
Review of attachment 218159 [details] [review]:

Patch breaks the wallpaper during the switch. Also a less "awefully messy" commit message would be nice.
Comment 14 Florian Müllner 2012-07-06 13:32:41 UTC
Review of attachment 218160 [details] [review]:

Nice cleanup. Patch breaks DND of window previews to workspace thumbnails though (if the drop happens over a window preview of the thumbnail)
Comment 15 Florian Müllner 2012-07-06 13:32:58 UTC
Review of attachment 218161 [details] [review]:

OK
Comment 16 Florian Müllner 2012-07-06 13:33:10 UTC
Review of attachment 218162 [details] [review]:

Beside the comment below, s/Cluttrer/Clutter/ in the commit message

::: js/ui/altTab.js
@@ +1111,3 @@
+            let clone = new Meta.WindowActor({ meta_window: metaWindow,
+                                               reactive: true,
+                                               scale_x: scale, scale_y: scale });

Using scale_x/scale_y instead of width/height messes up the positioning.
Comment 17 Jasper St. Pierre (not reading bugmail) 2012-07-06 16:28:28 UTC
(In reply to comment #10)
> Review of attachment 218156 [details] [review]:
> 
> Looks mostly good, except for some minor comments and some breakage.
> 
> ::: js/ui/overview.js
> @@ +111,3 @@
> +        this.actor = new St.Widget();
> +        Main.uiGroup.add_actor(this.actor);
> +        this.actor.lower(global.window_group);
> 
> Unrelated to this patch

How so?
Comment 18 Florian Müllner 2012-07-06 16:55:04 UTC
(In reply to comment #17)
> (In reply to comment #10)
> > +        this.actor.lower(global.window_group);
> > 
> > Unrelated to this patch
> 
> How so?

You don't need to lower the actor below global.window_group unless it's visible in the overview.
Comment 19 Jasper St. Pierre (not reading bugmail) 2012-07-06 17:18:33 UTC
(In reply to comment #11)
> Review of attachment 218157 [details] [review]:
> 
> I'm really not sure it is a good idea to allow random UI in the overview - IMO
> it is system space and not something applications should be able to mess with
> (more so as applications don't have any means to determine the location of
> system elements, so they could end up covering anything). The only valid use
> case I can think of are g-s-d's OSDs, which are system UI as well - but as
> such, I'd rather see the UI code move into the shell than opening this can of
> worms ...

I think moving all possible global UI in the shell is another can of worms. But that's neither here nor there. What about the grommit case, though?

The thing is that we really shouldn't be managing OR windows at all -- it's only through composite that we have that ability. I'm also perfectly fine with adding an X property to ensure that yes, you really want to show this in the overview, if the concern is accidental overlap rather than abuse.
Comment 20 Jasper St. Pierre (not reading bugmail) 2012-07-06 17:20:21 UTC
(In reply to comment #16)
> Review of attachment 218162 [details] [review]:
> 
> Beside the comment below, s/Cluttrer/Clutter/ in the commit message
> 
> ::: js/ui/altTab.js
> @@ +1111,3 @@
> +            let clone = new Meta.WindowActor({ meta_window: metaWindow,
> +                                               reactive: true,
> +                                               scale_x: scale, scale_y: scale
> });
> 
> Using scale_x/scale_y instead of width/height messes up the positioning.

MetaWindowActor directly won't scale with a changed width/height -- it will clip, since there's no direct scaling logic. Given that we have code in mutter to special case the scale with a mipmap, should we change mutter to support that?
Comment 21 Jasper St. Pierre (not reading bugmail) 2012-07-06 17:29:02 UTC
(In reply to comment #18)
> (In reply to comment #17)
> > (In reply to comment #10)
> > > +        this.actor.lower(global.window_group);
> > > 
> > > Unrelated to this patch
> > 
> > How so?
> 
> You don't need to lower the actor below global.window_group unless it's visible
> in the overview.

Yes I do -- otherwise the overview will be above other things like the panel.
Comment 22 Florian Müllner 2012-07-06 20:15:34 UTC
(In reply to comment #19)
> I think moving all possible global UI in the shell is another can of worms. But
> that's neither here nor there. What about the grommit case, though?

I don't consider "all UI we consider 'system/OS'" the same as "all possible global UI". A couple quick searches on "grommit" didn't turn up anything relevant, so I can't say anything about the grommit case ...


> The thing is that we really shouldn't be managing OR windows at all -- it's
> only through composite that we have that ability.

There are a couple of things we can only do through composite - that's neither an argument in favor of showing OR windows in the overview nor against it. On the other hand, without composite the overview would probably be a fullscreen OR window covering any other windows (OR or not) ;-)
(and no, that's not a valid argument either, I know)


> I'm also perfectly fine with adding an X property to ensure that yes, 
> you really want to show this in the overview, if the concern is accidental 
> overlap rather than abuse.

Yes, you mentioned the possibility of a property, but I'm more worried about blurring the distinction between applications and system (e.g. the "abuse" case). We already offer a pretty powerful mechanism to modify/adjust/hack the system UI, I don't think adding another (inferior) one is a very good idea ...
Comment 23 Jasper St. Pierre (not reading bugmail) 2012-07-06 20:36:02 UTC
> (In reply to comment #19)
> > I think moving all possible global UI in the shell is another can of worms. But
> > that's neither here nor there. What about the grommit case, though?
> 
> I don't consider "all UI we consider 'system/OS'" the same as "all possible
> global UI". A couple quick searches on "grommit" didn't turn up anything
> relevant, so I can't say anything about the grommit case ...

That's because I keep misspelling it: http://www.home.unix-ag.org/simon/gromit/

It's an old app. Monty is updating it to work in GNOME 3, and was having trouble. That's what I originally wrote the OR patch stack for.

> Yes, you mentioned the possibility of a property, but I'm more worried about
> blurring the distinction between applications and system (e.g. the "abuse"
> case). We already offer a pretty powerful mechanism to modify/adjust/hack the
> system UI, I don't think adding another (inferior) one is a very good idea ...

It's a separation of concerns. I really don't want to see everything ever go into the compositor because we're too lazy to build proper protocols. I am very opposed to having random system UI like OSDs going into the Shell.

The Shell already does way too much, it's growing to be super complicated, and we're not testing any part of it.

There's also cases where an application may want to have an overlay without being written in JavaScript or having any GNOME-specific part at all.
Comment 24 Jasper St. Pierre (not reading bugmail) 2012-07-12 14:12:18 UTC
Comment on attachment 218158 [details] [review]
windowManager: Remove unused function

Attachment 218158 [details] pushed as de65739 - windowManager: Remove unused function
Comment 25 drago01 2012-09-18 07:21:13 UTC
As I told you on IRC a while ago ... you can't create multiple TFP textures from the same pixmap / window on some drivers (atleast NVIDIA does not allow that). That will cause cogl to fallback to using XGetImage which is *slow*. You'd be better off reusing the textures instead of creating new ones.

(Adding that to the bug for reference).
Comment 26 drago01 2012-09-18 07:22:56 UTC
(In reply to comment #25)
> As I told you on IRC a while ago ... you can't create multiple TFP textures
> from the same pixmap / window on some drivers (atleast NVIDIA does not allow
> that). That will cause cogl to fallback to using XGetImage which is *slow*.
> You'd be better off reusing the textures instead of creating new ones.
> 
> (Adding that to the bug for reference).

Oh actually I have already said that in the mutter bug (just saw this bug now while going through the patch queue; ignore that).
Comment 27 drago01 2012-12-29 23:22:22 UTC
Review of attachment 218161 [details] [review]:

Getting of the acn list.
Comment 28 GNOME Infrastructure Team 2021-07-05 14:19:09 UTC
GNOME is going to shut down bugzilla.gnome.org in favor of  gitlab.gnome.org.
As part of that, we are mass-closing older open tickets in bugzilla.gnome.org
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
  https://wiki.gnome.org/GettingInTouch/BugReportingGuidelines
and create a new ticket at
  https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/

Thank you for your understanding and your help.