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 671937 - Fix thick outline shown in Alt+Tab and Alt+Escape
Fix thick outline shown in Alt+Tab and Alt+Escape
Status: RESOLVED OBSOLETE
Product: mutter
Classification: Core
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: mutter-maint
mutter-maint
: 637161 676681 695415 725388 (view as bug list)
Depends on:
Blocks: 685621
 
 
Reported: 2012-03-12 19:41 UTC by Jasper St. Pierre (not reading bugmail)
Modified: 2014-12-29 04:19 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
screen: Fix thick border for alt-tab popup (2.18 KB, patch)
2012-03-12 19:41 UTC, Jasper St. Pierre (not reading bugmail)
none Details | Review
tabpopup: Fix positioning for alt-tab outline popup (2.29 KB, patch)
2012-03-12 19:41 UTC, Jasper St. Pierre (not reading bugmail)
none Details | Review
screen: Fix thick border for alt-tab popup (2.39 KB, patch)
2012-03-12 19:51 UTC, Jasper St. Pierre (not reading bugmail)
needs-work Details | Review
tabpopup: Fix positioning for alt-tab outline popup (2.50 KB, patch)
2012-03-12 19:51 UTC, Jasper St. Pierre (not reading bugmail)
reviewed Details | Review
screen: Fix thick border for alt-tab popup (2.70 KB, patch)
2012-03-12 20:16 UTC, Jasper St. Pierre (not reading bugmail)
none Details | Review

Description Jasper St. Pierre (not reading bugmail) 2012-03-12 19:41:39 UTC
When using alt-tab in the mutter default plugin or alt-escape in the shell,
a very thick outline is shown. This is a regression of invisible borders.
Besides that, there are a number of obsolete hacks that we do to go behind
gdk's back that can just be removed completely.
Comment 1 Jasper St. Pierre (not reading bugmail) 2012-03-12 19:41:40 UTC
Created attachment 209529 [details] [review]
screen: Fix thick border for alt-tab popup
Comment 2 Jasper St. Pierre (not reading bugmail) 2012-03-12 19:41:42 UTC
Created attachment 209530 [details] [review]
tabpopup: Fix positioning for alt-tab outline popup
Comment 3 Jasper St. Pierre (not reading bugmail) 2012-03-12 19:51:42 UTC
Created attachment 209534 [details] [review]
screen: Fix thick border for alt-tab popup

Since the landing of invisible borders, the math here to calculate
the outline is incorrect. Since this is a minor effect, it's not worth
it to have the complex logic be the same - just hardcode the logic
instead.
Comment 4 Jasper St. Pierre (not reading bugmail) 2012-03-12 19:51:51 UTC
Created attachment 209535 [details] [review]
tabpopup: Fix positioning for alt-tab outline popup

The code here was playing a lot of tricks behind GDK's back for
unknown reasons. Replacing the sneaky stuff with more straightforward
and regular code works fine and fixes positioning bugs, so let's just
do that instead.




Add better commit messages.
Comment 5 Owen Taylor 2012-03-12 20:12:22 UTC
Review of attachment 209534 [details] [review]:

Fine, but you do need not to leave the comment above describing the way it used to work!
Comment 6 Jasper St. Pierre (not reading bugmail) 2012-03-12 20:16:14 UTC
Created attachment 209538 [details] [review]
screen: Fix thick border for alt-tab popup

Since the landing of invisible borders, the math here to calculate
the outline is incorrect. Since this is a minor effect, it's not worth
it to have the complex logic be the same - just hardcode the logic
instead.
Comment 7 André Klapper 2012-03-12 20:25:02 UTC
I assume this is 3.5.x stuff as it would change the UI?
Comment 8 Owen Taylor 2012-03-12 20:29:48 UTC
(In reply to comment #7)
> I assume this is 3.5.x stuff as it would change the UI?

This is about massively obvious bugs - try using alt-Escape. Not subject to the UI freeze as far as I can imagine.
Comment 9 Jasper St. Pierre (not reading bugmail) 2012-03-12 20:30:43 UTC
The only use of this outline in the Shell is the hidden Alt+Escape feature, and the feature looks broken and glitched to hell without these patches. I cannot imagine this in any way being a UI break, unless we have "It looks like a monster ate your computer screen if you press Alt+Escape" in the documentation somewhere.
Comment 10 Owen Taylor 2012-03-12 20:41:45 UTC
Review of attachment 209535 [details] [review]:

Can you spend a little more time and see if you can track down why this tricks behind GTK+'s (not GDK's) back are no longer working? - it is fairly clear why they are there.

I think the way forward here is to port the whole of tabpopup to clutter actors and move it from ui/ to compositor/ (and to do the highlight as something like meta_window_actor_set_highlighted() to avoid stacking order issues), but that is rather over-ambitious for this point in the cycle, so if we can't figure out some simple fix, I'm OK accepting some redraw regressions - after all it's been much more broken for a release or two.

::: src/ui/tabpopup.c
@@ -487,3 @@
-      gdk_window_move_resize (window,
-                              te->rect.x, te->rect.y,
-                              te->rect.width, te->rect.height);

Here I'm pretty sure that it is using move_resize() to avoid a visible two-step move-resize dance. This is less of a problem with composited single frames, but it's still possible we might get one of the ConfigureNotifies and not the other.

@@ -506,2 @@
-      /* This should piss off gtk a bit, but we don't want to raise
-       * above the tab popup.  So, instead of calling gtk_widget_show,

The comment *describes* why it is playing tricks.
Comment 11 Jasper St. Pierre (not reading bugmail) 2012-03-12 21:17:55 UTC
(In reply to comment #10)
> Review of attachment 209535 [details] [review]:
> 
> Can you spend a little more time and see if you can track down why this tricks
> behind GTK+'s (not GDK's) back are no longer working? - it is fairly clear why
> they are there.

I'm not an experienced GTK+/GDK hacker, so I'm not the best person to ask. My best guess is "we were relying on the way GTK+ was using GDK", and that broke some time long ago.

> I think the way forward here is to port the whole of tabpopup to clutter actors
> and move it from ui/ to compositor/ (and to do the highlight as something like
> meta_window_actor_set_highlighted() to avoid stacking order issues), but that
> is rather over-ambitious for this point in the cycle, so if we can't figure out
> some simple fix, I'm OK accepting some redraw regressions - after all it's been
> much more broken for a release or two.

It wouldn't be too hard to do this, but it's not worth it at this point in the cycle in my opinion - there are higher priority issues.

> ::: src/ui/tabpopup.c
> @@ -487,3 @@
> -      gdk_window_move_resize (window,
> -                              te->rect.x, te->rect.y,
> -                              te->rect.width, te->rect.height);
> 
> Here I'm pretty sure that it is using move_resize() to avoid a visible two-step
> move-resize dance. This is less of a problem with composited single frames, but
> it's still possible we might get one of the ConfigureNotifies and not the
> other.

If we want to avoid a two-step move-resize dance, we should add API to GTK+, not go behind its back. We shape it as part of drawing, so even right now it might be possible that we don't get the ShapeNotify, right?

> @@ -506,2 @@
> -      /* This should piss off gtk a bit, but we don't want to raise
> -       * above the tab popup.  So, instead of calling gtk_widget_show,
> 
> The comment *describes* why it is playing tricks.

Yet if you try the patch, it stacks under the tab popup anyway. I don't know why, I just noticed that it worked.
Comment 12 Jasper St. Pierre (not reading bugmail) 2012-03-23 01:07:53 UTC
*** Bug 637161 has been marked as a duplicate of this bug. ***
Comment 13 Jasper St. Pierre (not reading bugmail) 2012-05-23 19:24:34 UTC
*** Bug 676681 has been marked as a duplicate of this bug. ***
Comment 14 Stéphane Démurget 2012-12-12 10:10:35 UTC
I've got an other user report telling it is broken and two duplicates were opened already. I tested and the patch still applies and works like a charm.

Owen, I understand your concerns about move-resize, but don't you think it would be nice to get this in? Would you mind reviewing the second patch? This results in very obvious bugs like you said in comment #7.

Maybe we could add a note in the patch to explain why move-resize is not used anymore, with a link to this bug. And open a new one for the way forward you suggested, but which can be quite some work?
Comment 15 Jasper St. Pierre (not reading bugmail) 2013-03-08 01:15:47 UTC
*** Bug 695415 has been marked as a duplicate of this bug. ***
Comment 16 Florian Müllner 2014-02-28 10:20:34 UTC
*** Bug 725388 has been marked as a duplicate of this bug. ***