compositor-x11: Move the x11 window close to an idle handler
authorDerek Foreman <derekf@osg.samsung.com>
Tue, 27 Jan 2015 22:26:49 +0000 (16:26 -0600)
committerBryce Harrington <bryce@osg.samsung.com>
Thu, 5 Feb 2015 03:51:34 +0000 (19:51 -0800)
commitd540f4bb76359988cdc54b12d7ae4268a07375fa
treeccd36ed27c6a45cab76f5c2fe658c3f64c116904
parent3e4d4bdd94f6db154e77df72cc2da366cf72629f
compositor-x11: Move the x11 window close to an idle handler

The input loop is actually dispatched in the middle of the frame repaint.
When the X11 event results in closing the compositor, this can cause the
current output to be destroyed just prior to trying to process animations
on it.

We fix this by handling the window close event in an idle callback.

NOTE: this requires a patch for wayland that moves the idle handler
dispatch to after epoll_wait in the event loop processing.

Closes bug: https://bugs.freedesktop.org/show_bug.cgi?id=81314

Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
src/compositor-x11.c