1
0
Fork 0
mirror of https://github.com/gwm17/glfw.git synced 2024-11-27 04:28:52 -05:00

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.
This commit is contained in:
Emmanuel Gil Peyrot 2015-11-02 00:39:52 +00:00 committed by Camilla Berglund
parent 9f3636a103
commit 4c06426d46

View File

@ -238,15 +238,15 @@ int _glfwPlatformCreateWindow(_GLFWwindow* window,
const _GLFWctxconfig* ctxconfig, const _GLFWctxconfig* ctxconfig,
const _GLFWfbconfig* fbconfig) const _GLFWfbconfig* fbconfig)
{ {
if (!createSurface(window, wndconfig))
return GLFW_FALSE;
if (ctxconfig->api != GLFW_NO_API) if (ctxconfig->api != GLFW_NO_API)
{ {
if (!_glfwCreateContext(window, ctxconfig, fbconfig)) if (!_glfwCreateContext(window, ctxconfig, fbconfig))
return GLFW_FALSE; return GLFW_FALSE;
} }
if (!createSurface(window, wndconfig))
return GLFW_FALSE;
if (wndconfig->monitor) if (wndconfig->monitor)
{ {
wl_shell_surface_set_fullscreen( wl_shell_surface_set_fullscreen(