Merge lp:~compiz-team/compiz-core/compiz-core.fix_geometry_cycling into lp:compiz-core/0.9.5
Status: | Merged |
---|---|
Approved by: | Mirco Müller |
Approved revision: | 2798 |
Merged at revision: | 2812 |
Proposed branch: | lp:~compiz-team/compiz-core/compiz-core.fix_geometry_cycling |
Merge into: | lp:compiz-core/0.9.5 |
Diff against target: |
94 lines (+24/-1) 2 files modified
src/privatewindow.h (+3/-0) src/window.cpp (+21/-1) |
To merge this branch: | bzr merge lp:~compiz-team/compiz-core/compiz-core.fix_geometry_cycling |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Mirco Müller (community) | Approve | ||
Review via email: mp+73127@code.launchpad.net |
Description of the change
Don't allow outdated server position to move a window back if a plugin
has already requested at a point in time past when the server was told to move
the window to change the geometry without syncing the position.
This should solve the problem of plugin A doing w->move, w->syncPosition and plugin
B doing w->move (wait) w->syncPosition where we return to handleEvent in between
the move and the position sync and the server will send us a ConfigureNotify
event for the position that was last sent to the server even if a plugin
has more recently updated the current geometry, and this geometry recieved
from the server will overwrite the current plugin's working geometry that
it was going to sync anyways later and cause moveNotify to be called.
At the moment, we're just comparing timestamps from when the geometry was
last updated by a plugin and when geometry was last sent to the server. Note
that in reality, CompWindow::move should not be updating priv->geometry directly,
this should only really be allowed to be updated by the server. However, it
doesn't make sense for it to update priv->serverGeo
geometry last sent to the server. In reality, a larger API break will be
needed in order to represent the four possible states of geometry at any given
time.
a) geometry by the compositor (current geometry, not pending to send to server)
b) geometry last sent to server
c) geometry last recieved by the server
d) current server side geometry (which must be retrieved via a round-trip
to the server)
Note that I don't think that this change should go in the 0.9.5.x series, but we should really wait for 0.9.7
I don't have my system setup to compile compiz atm, but as far as I can tell all this look ok. BTW just get into the habit of initializing any declared variables/structs (lastGeometryUp date, lastConfigureRe quest).