weston/clients
Pekka Paalanen 77cbc951cb window: clean up redraw and focuses on destroy
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>
2011-11-15 16:43:24 -05:00
..
.gitignore Update .gitignores 2011-10-28 13:32:17 -04:00
cairo-util.c cairo-util: Fix another last-minute typo 2011-10-20 14:44:48 -04:00
cairo-util.h cairo-util: Add helper to load jpeg files 2011-10-20 13:11:12 -04:00
config.c config: fix boolean parsing 2011-11-15 09:04:56 -05:00
desktop-shell.c desktop-shell: screen locking protocol 2011-11-15 14:18:50 -05:00
dnd.c window: Remove display_flush_cairo_device 2011-10-07 10:05:57 +02:00
eventdemo.c window.c: Drop global handler argument 2011-08-29 17:12:36 -04:00
flower.c window: Stop using glib mainloop in toy toolkit 2011-09-19 17:28:55 -04:00
gears.c gears: Fail if compiled without cairo-egl 2011-10-07 10:06:01 +02:00
image.c window: Stop using glib mainloop in toy toolkit 2011-09-19 17:28:55 -04:00
Makefile.am window: Add a cheesy parser for ini-files, use it in desktop-shell 2011-11-14 22:51:02 -05:00
resizor.c window: Stop using glib mainloop in toy toolkit 2011-09-19 17:28:55 -04:00
screenshot.c window: Stop using glib mainloop in toy toolkit 2011-09-19 17:28:55 -04:00
simple-egl.c simple-egl: Remove leftover wl_visual variable 2011-10-19 21:16:58 -04:00
simple-shm.c Move away from visuals and just use EGLConfigs or shm format tokens 2011-08-31 16:21:38 -04:00
smoke.c window: Stop using glib mainloop in toy toolkit 2011-09-19 17:28:55 -04:00
terminal.c window: Stop using glib mainloop in toy toolkit 2011-09-19 17:28:55 -04:00
view.c Add missing include for gio.h. 2011-10-24 11:58:24 -04:00
window.c window: clean up redraw and focuses on destroy 2011-11-15 16:43:24 -05:00
window.h window: add a helper for config file paths 2011-11-15 08:57:01 -05:00