mirror of
https://github.com/kovidgoyal/kitty.git
synced 2024-11-14 12:11:12 +03:00
wl: Fix destroying CSDs in correct order (#3051)
On Wayland, some compositors refuse to implement SSDs in which case we draw primitive CSDs. However, the destructors were called in the wrong order, leading to a dereference of an already freed object.
This commit is contained in:
parent
93d1aacfb6
commit
bc2dcdf9db
4
glfw/wl_window.c
vendored
4
glfw/wl_window.c
vendored
@ -413,10 +413,10 @@ static void createDecorations(_GLFWwindow* window)
|
||||
|
||||
static void destroyDecoration(_GLFWdecorationWayland* decoration)
|
||||
{
|
||||
if (decoration->surface)
|
||||
wl_surface_destroy(decoration->surface);
|
||||
if (decoration->subsurface)
|
||||
wl_subsurface_destroy(decoration->subsurface);
|
||||
if (decoration->surface)
|
||||
wl_surface_destroy(decoration->surface);
|
||||
if (decoration->viewport)
|
||||
wp_viewport_destroy(decoration->viewport);
|
||||
decoration->surface = NULL;
|
||||
|
Loading…
Reference in New Issue
Block a user