From 3b64bae32341d564881d51adcd95dcc691756d75 Mon Sep 17 00:00:00 2001 From: Camilla Berglund Date: Fri, 19 Feb 2016 08:56:46 +0100 Subject: [PATCH] Fix X11 WSI extension selection logic --- src/x11_window.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/x11_window.c b/src/x11_window.c index eaac057a..46e2d32b 100644 --- a/src/x11_window.c +++ b/src/x11_window.c @@ -2148,7 +2148,7 @@ int _glfwPlatformGetPhysicalDevicePresentationSupport(VkInstance instance, VisualID visualID = XVisualIDFromVisual(DefaultVisual(_glfw.x11.display, _glfw.x11.screen)); - if (_glfw.vk.KHR_xcb_surface) + if (_glfw.vk.KHR_xcb_surface && _glfw.x11.x11xcb.handle) { PFN_vkGetPhysicalDeviceXcbPresentationSupportKHR vkGetPhysicalDeviceXcbPresentationSupportKHR = (PFN_vkGetPhysicalDeviceXcbPresentationSupportKHR) @@ -2198,7 +2198,7 @@ VkResult _glfwPlatformCreateWindowSurface(VkInstance instance, const VkAllocationCallbacks* allocator, VkSurfaceKHR* surface) { - if (_glfw.vk.KHR_xcb_surface) + if (_glfw.vk.KHR_xcb_surface && _glfw.x11.x11xcb.handle) { VkResult err; VkXcbSurfaceCreateInfoKHR sci;