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 693922 - MetaWindowActor: Freeze shouldn't affect actor position
MetaWindowActor: Freeze shouldn't affect actor position
Status: RESOLVED FIXED
Product: mutter
Classification: Core
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: mutter-maint
mutter-maint
: 693853 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2013-02-15 21:07 UTC by Owen Taylor
Modified: 2013-02-16 02:48 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
MetaWindowActor: Freeze shouldn't affect actor position (3.65 KB, patch)
2013-02-15 21:07 UTC, Owen Taylor
committed Details | Review
MetaWindowActor: Go back to freezing affecting actor geometry (8.05 KB, patch)
2013-02-16 02:34 UTC, Owen Taylor
committed Details | Review

Description Owen Taylor 2013-02-15 21:07:46 UTC
If a window is frozen because it is repainting, that shouldn't kee[p
us from updating its position: we don't want a slow-to-update window
to move around the screen chunkily when dragged. (This does reduce
the efficiency of begin/end frames for replacing double-buffering,
but that never works very well in the case where there was an overlapping
window or the entire screen needed redrawing for whatever reason.)

This fixes a bug where a window that was mapped frozen would not get
positioned properly until after the map effect finished, and would
jump from 0,0 at that point. Since effects *do* need to prevent
actor repositioning by Mutter, we must position the actor before any
effect starts.

Because we now are queuing invalidates on frozen windows, fix the
logic for that so that we properly update everything when the window
unfreezes.
Comment 1 Owen Taylor 2013-02-15 21:07:47 UTC
Created attachment 236306 [details] [review]
MetaWindowActor: Freeze shouldn't affect actor position
Comment 2 Jasper St. Pierre (not reading bugmail) 2013-02-15 21:14:13 UTC
Review of attachment 236306 [details] [review]:

OK.
Comment 3 Owen Taylor 2013-02-15 21:16:26 UTC
Attachment 236306 [details] pushed as 3d337a9 - MetaWindowActor: Freeze shouldn't affect actor position
Comment 4 Cosimo Cecchi 2013-02-15 21:21:36 UTC
*** Bug 693853 has been marked as a duplicate of this bug. ***
Comment 5 Owen Taylor 2013-02-16 02:34:02 UTC
Created attachment 236331 [details] [review]
MetaWindowActor: Go back to freezing affecting actor geometry

It turns out that the last patch was wrong - it broke some of the most dramatic
demos of frame synchronization, like resizing a window from the left and having
that be as smooth as resizing from the right. Here's a patch that just excludes
the initial map from the freeze, but leaves other geometry changes affected
by freezing.
Comment 6 Jasper St. Pierre (not reading bugmail) 2013-02-16 02:38:33 UTC
Review of attachment 236331 [details] [review]:

This makes sense to me.
Comment 7 Owen Taylor 2013-02-16 02:47:47 UTC
For posterity, from IRC:

<Jasper> owen, perhaps in the future we should refine the semantics so that map effects will need to set a position
<owen> Jasper: possible, yes. This seems rather hacky - and it is there basically because we are allowing the effect *either* to affect the position or not and we dont' know which
<owen> I believe you see a bad effect from this in gtk+/tests/animated-resizing - where it jumps about to begin with - the position is frozen during the map effect though the map effect just wants to affect the opacity. Then when the effect ends the window starts doing the proper centered resizing
<Jasper> owen, I think we should split it out so that there's two freezes -- animation / plugin freeze, and sync freeze
<Jasper> And a plugin would have to call freeze_position() or freeze_size().
<owen> OK, it helps if the plugin actually has to do the freeze itself
<owen> Maybe something to do when we get rid of the plugin class in favor of something more flexible and library-like
<owen> I want to land this patch for now to get things working 95%
Comment 8 Owen Taylor 2013-02-16 02:48:45 UTC
Attachment 236331 [details] pushed as d900d83 - MetaWindowActor: Go back to freezing affecting actor geometry