From 4c06426d46239c53776a9d0868427d93ab4ee6b3 Mon Sep 17 00:00:00 2001 From: Emmanuel Gil Peyrot Date: Mon, 2 Nov 2015 00:39:52 +0000 Subject: [PATCH] Wayland: Create the surface before the context This fixes a regression introduced in 496f559c where a context would be created for a NULL egl_surface, which subsequently fails. Fixes #633. --- src/wl_window.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/wl_window.c b/src/wl_window.c index 8aa7b99f..fd729ff0 100644 --- a/src/wl_window.c +++ b/src/wl_window.c @@ -238,15 +238,15 @@ int _glfwPlatformCreateWindow(_GLFWwindow* window, const _GLFWctxconfig* ctxconfig, const _GLFWfbconfig* fbconfig) { + if (!createSurface(window, wndconfig)) + return GLFW_FALSE; + if (ctxconfig->api != GLFW_NO_API) { if (!_glfwCreateContext(window, ctxconfig, fbconfig)) return GLFW_FALSE; } - if (!createSurface(window, wndconfig)) - return GLFW_FALSE; - if (wndconfig->monitor) { wl_shell_surface_set_fullscreen(