move-layer: fix a race condition with leave()
authorAndrew Chadwick <andrewc-git@piffle.org>
Fri, 4 Jan 2013 04:28:33 +0000 (04:28 +0000)
committerAndrew Chadwick <andrewc-git@piffle.org>
Fri, 4 Jan 2013 04:28:33 +0000 (04:28 +0000)
commitdf3afd837ebaa9794f9b0eaaa32bd7b0ae8efcf7
treeac9a8ba2d9a75285f97cc7bcdf6d15347c8d4e37
parent578b1c9f0687ef5eac05732e2eaceaf5e3c2337a
move-layer: fix a race condition with leave()

Leaving due to a springloaded mode keyup was causing leave() to be
called while idle callbacks were still processing the finalize code,
leading to an exception. Fix by forcing everything to completion during
leave() while the mode is still in a good state.

https://gna.org/bugs/?20397

Also spotted and fixed a similar one with the move idler.
gui/canvasevent.py