GNOME Bugzilla – Bug 640560
Window size in overview not recalculated correctly
Last modified: 2011-01-25 20:54:21 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.
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.
Review of attachment 179309 [details] [review]: Doesn't this trigger warnings about queuing relayout out of an allocation?
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 ...
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()
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.
Review of attachment 179321 [details] [review]: Looks good
Attachment 179321 [details] pushed as e2e90a5 - Overview: Adjust to window size changes