~smspillaz/compiz-core/oneiric.20110927_fixes

Viewing all changes in revision 2819.

  • Committer: Sam Spilsbury
  • Date: 2011-09-27 09:23:29 UTC
  • Revision ID: sam.spilsbury@canonical.com-20110927092329-mbnaj8o89on8jqyz
Since we are the only one to make ConfigureWindow requests on toplevels which the
server will actually obey, it is possible track outgoing ConfigureWindow requests
and match them to incoming ConfigureNotify events, assuming that priv->geometry
and priv->serverGeometry ONLY represent what was last sent to the server and what
was last received. Which allows us to effectively fix the race conditions
which made positioning and stacking unpredictable at times.

As such, any plugins past this commit, need to be careful not to modify w->geometry
or w->serverGeometry directly. Unfortunately, the move plugin is a serial offender in
this area and will update w->serverGeometry directly after doing w->move, which causes
race conditions when other plugins try to configure a window through the server first.

This change ensures that when there are pending ConfigureNotify events, no synchronous
updates of the window geometry are allowed. For plugins that do touch w->serverGeometry
for whatever reason, a lock_geometry call is sent through handleCompizEvent whenever
there are pending ConfigureNotify events for plugins not to do that. This will remain
in place until we can break ABI/API and prevent plugins from doing that.

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: