Commit 4c06426d authored by Emmanuel Gil Peyrot's avatar Emmanuel Gil Peyrot Committed by Camilla Berglund
Browse files

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.
parent 9f3636a1
......@@ -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(
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment