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 640560 - Window size in overview not recalculated correctly
Window size in overview not recalculated correctly
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: general
2.91.x
Other Linux
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2011-01-25 17:42 UTC by Michael Monreal
Modified: 2011-01-25 20:54 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Screenshot (237.98 KB, image/png)
2011-01-25 17:42 UTC, Michael Monreal
  Details
Overview: Adjust to window size changes (1.98 KB, patch)
2011-01-25 18:50 UTC, Florian Müllner
none Details | Review
Overview: Adjust to window size changes (2.18 KB, patch)
2011-01-25 19:10 UTC, Florian Müllner
reviewed Details | Review
Overview: Adjust to window size changes (1.07 KB, patch)
2011-01-25 20:34 UTC, Florian Müllner
committed Details | Review

Description Michael Monreal 2011-01-25 17:42:18 UTC
Created attachment 179303 [details]
Screenshot

The easiest way to reproduce this is making a call with Ekiga. Hang up and open the overview before the call sidebar closes. The window will shrink back to its original size, but it will not trigger a reflow on the overview. On the screenshot you can see the misplaced close icon and non-centered title.

I assume this affects all windows which change size without user interaction.
Comment 1 Florian Müllner 2011-01-25 18:50:33 UTC
Created attachment 179309 [details] [review]
Overview: Adjust to window size changes

Windows may change their size while the overview is open, e.g. when
switching panels in the control center. Make sure that the preview's
position and overlay are updated in that case.
Comment 2 Owen Taylor 2011-01-25 18:53:32 UTC
Review of attachment 179309 [details] [review]:

Doesn't this trigger warnings about queuing relayout out of an allocation?
Comment 3 Florian Müllner 2011-01-25 19:10:53 UTC
Created attachment 179313 [details] [review]
Overview: Adjust to window size changes

(In reply to comment #2)
> Review of attachment 179309 [details] [review]:
> 
> Doesn't this trigger warnings about queuing relayout out of an allocation?

Right ...
Comment 4 Owen Taylor 2011-01-25 19:31:32 UTC
Review of attachment 179313 [details] [review]:

Hmm, don't think this is really *right*. I'll propose an alternate approach, but if that isn't workable,  I'm OK with this since it's just a corner case. Would need a comment for why you added a Meta.later_add() - we should never be just blindly pushing things off to an idle/later to fix problems without thinking and recording the reason.

::: js/ui/workspace.js
@@ +1345,3 @@
+        clone.connect('size-changed',
+                      Lang.bind(this, function() {
+                          Meta.later_add(Meta.LaterType.BEFORE_REDRAW,

Doing BEFORE_REDRAW laters out of allocation is a bit sketchy since the order is

 events
 animations / BEFORE_REDRAW callbacks (ordering not defined)
 allocation
 redraw

Doing BEFORE_REDRAW here will be safe but will do it before the *next* redraw, so the window will draw large for one frame then your function will run. I think my best suggestion here is that we should have a size-changed signal on MetaWindowActor - could be emitted out of meta_window_actor_update_bounding_region()
Comment 5 Florian Müllner 2011-01-25 20:34:46 UTC
Created attachment 179321 [details] [review]
Overview: Adjust to window size changes

(In reply to comment #4)
> Review of attachment 179313 [details] [review]:
> 
> I think my best suggestion here is that we should have a size-changed signal on
> MetaWindowActor - could be emitted out of
> meta_window_actor_update_bounding_region()

Works nicely, thanks.
Comment 6 Owen Taylor 2011-01-25 20:47:26 UTC
Review of attachment 179321 [details] [review]:

Looks good
Comment 7 Florian Müllner 2011-01-25 20:54:17 UTC
Attachment 179321 [details] pushed as e2e90a5 - Overview: Adjust to window size changes