diff options
author | Kristian Høgsberg <krh@bitplanet.net> | 2012-04-27 15:29:35 -0400 |
---|---|---|
committer | Kristian Høgsberg <krh@bitplanet.net> | 2012-04-27 15:36:45 -0400 |
commit | c9b13696dd1a46e9219d0ed56df897966cc33201 (patch) | |
tree | 4279fc1b46626bdfcbfc265d27706dfb39b5b767 | |
parent | 801b0e4ad7a0f44e02061225e6723d8adc12fae2 (diff) |
xwayland: Only remove xwl_window from damage list if it's on it
We determine whether or not it's on the list using DamageEmpty(). Spotted
by Tomasz Borowik <timon37@lavabit.com>.
-rw-r--r-- | hw/xfree86/xwayland/xwayland-window.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/hw/xfree86/xwayland/xwayland-window.c b/hw/xfree86/xwayland/xwayland-window.c index e58350feb..07a5c7c3e 100644 --- a/hw/xfree86/xwayland/xwayland-window.c +++ b/hw/xfree86/xwayland/xwayland-window.c @@ -248,7 +248,8 @@ xwl_unrealize_window(WindowPtr window) wl_buffer_destroy(xwl_window->buffer); wl_surface_destroy(xwl_window->surface); xorg_list_del(&xwl_window->link); - xorg_list_del(&xwl_window->link_damage); + if (RegionNotEmpty(DamageRegion(xwl_window->damage))) + xorg_list_del(&xwl_window->link_damage); DamageUnregister(&window->drawable, xwl_window->damage); DamageDestroy(xwl_window->damage); free(xwl_window); |