xwm: Fix icon surface ownership
authorEmmanuel Gil Peyrot <linkmauve@linkmauve.fr>
Wed, 24 Jan 2018 22:29:53 +0000 (23:29 +0100)
committerDaniel Stone <daniels@collabora.com>
Fri, 9 Feb 2018 17:01:09 +0000 (17:01 +0000)
commit44fc1be913ab2faad0414f50e51d58310302d065
tree0865be9b2b4bd34e2766c6399c12fa10c4d44cbe
parent5e12b553b13dce50510370ed3eaffb4d27d20f5a
xwm: Fix icon surface ownership

The cairo surface used for the icon must be completely given to the
frame as soon as said frame has been created.  To prevent both the
window and the frame from sharing ownership of the icon, we set
window->icon_surface back to NULL right after creating or changing the
frame, only keeping it there when no frame has been created yet.

Fixes https://lists.freedesktop.org/archives/wayland-devel/2018-January/036655.html
Reported-by: Derek Foreman <derekf@osg.samsung.com>
Tested-by: Derek Foreman <derekf@osg.samsung.com>
Signed-off-by: Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
shared/cairo-util.h
shared/frame.c
xwayland/window-manager.c