77cbc951cb
Currently, the way to destroy a window in a response to an event (e.g. button click), is to put a task into the deferred list with display_defer(). The task will then call window_destroy() from outside event handling code. As events are handled, it is possible that the deferred list contains also the redraw task for this window. As the execution order of these tasks is unknown (redrawing a freed window is a bug) and redrawing something that goes away immediately is not useful, the redraw task must be removed on window_destroy(). 'struct input' contains pointers to windows currently in focus for that input device. These pointers must also be cleared on window_destroy(). This fixes a use-after-free bug for the unlock dialog in desktop-shell (future commit). As an irrelevant minor cleanup, window::grab_device member is not used anywhere, and is removed. Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com> |
||
---|---|---|
.. | ||
.gitignore | ||
cairo-util.c | ||
cairo-util.h | ||
config.c | ||
desktop-shell.c | ||
dnd.c | ||
eventdemo.c | ||
flower.c | ||
gears.c | ||
image.c | ||
Makefile.am | ||
resizor.c | ||
screenshot.c | ||
simple-egl.c | ||
simple-shm.c | ||
smoke.c | ||
terminal.c | ||
view.c | ||
window.c | ||
window.h |