From f5f5add52941db500e84c01d40ebd4cda986e43f Mon Sep 17 00:00:00 2001 From: ziga-lunarg Date: Sat, 20 Sep 2025 16:17:33 +0300 Subject: cube: Fix xlib window close XSetVMProtocols is needed to register WM_DELETE_WINDOW. Without this the window close event was never received. The window was still destroyed and vkAcquireNextImageKHR returned VK_ERROR_SURFACE_LOST_KHR --- cube/cube.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'cube/cube.cpp') diff --git a/cube/cube.cpp b/cube/cube.cpp index bad2cccb..7f4b45d2 100644 --- a/cube/cube.cpp +++ b/cube/cube.cpp @@ -3224,6 +3224,7 @@ void Demo::create_window() { XMapWindow(xlib_display, xlib_window); XFlush(xlib_display); xlib_wm_delete_window = XInternAtom(xlib_display, "WM_DELETE_WINDOW", False); + XSetWMProtocols(xlib_display, xlib_window, &xlib_wm_delete_window, 1); } void Demo::handle_xlib_event(const XEvent *event) { -- cgit v1.2.3