Browse Source

Platform: renove old workaround for a hidden GLFW Wayland window crash.

This was fixed in GLFW 3.3.7, released in 2022. As with the workaround
removed in the previous commit, it isn't reasonable to keep old patches
for functionality that used to be broken but is long fixed upstream.
IOW, if you're hitting this bug, either update GLFW or downgrade Magnum
to a version before this commit.
094aa6d3c7

This reverts commit c8d2c33ac6.
next
Vladimír Vondruš 2 days ago
parent
commit
a0011a9e39
  1. 8
      src/Magnum/Platform/GlfwApplication.cpp

8
src/Magnum/Platform/GlfwApplication.cpp

@ -544,14 +544,8 @@ bool GlfwApplication::tryCreate(const Configuration& configuration, const GLConf
/* Create window. Hide it by default so we don't have distracting window /* Create window. Hide it by default so we don't have distracting window
blinking in case we have to destroy it again right away. If the creation blinking in case we have to destroy it again right away. If the creation
succeeds, make the context current so we can query GL_VENDOR below. succeeds, make the context current so we can query GL_VENDOR below. */
If we are on Wayland, this is causing a segfault; a blinking window is
acceptable in this case. */
if(std::getenv("XDG_SESSION_TYPE") != "wayland"_s)
glfwWindowHint(GLFW_VISIBLE, false); glfwWindowHint(GLFW_VISIBLE, false);
else if(_verboseLog)
Warning{} << "Platform::GlfwApplication: Wayland detected, GL context has to be created with the window visible and may cause flicker on startup";
CORRADE_INTERNAL_ASSERT(configuration.title().flags() & Containers::StringViewFlag::NullTerminated);
if((_window = glfwCreateWindow(scaledWindowSize.x(), scaledWindowSize.y(), configuration.title().data(), monitor, nullptr))) if((_window = glfwCreateWindow(scaledWindowSize.x(), scaledWindowSize.y(), configuration.title().data(), monitor, nullptr)))
glfwMakeContextCurrent(_window); glfwMakeContextCurrent(_window);

Loading…
Cancel
Save