Add a note explaining why window decorations may be missing in wayland

This commit is contained in:
Kienan Stewart 2019-09-04 09:22:06 -04:00
parent 5b1b7227f8
commit b9b2b983cb
No known key found for this signature in database
GPG Key ID: 075A846E78FE47EA
1 changed files with 5 additions and 3 deletions

View File

@ -25,11 +25,14 @@ int main(int argc, char** argv)
return -1;
}
/* Create a windowed mode window and its OpenGL context */
// Create a windowed mode window and its OpenGL context
glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3);
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 0);
// Note: the decoration doesn't always work in Wayland, as it depends on the
// host system implementing wp_viewporter. This should be available in
// gnome 3.32+; kwin 5.15+
glfwWindowHint(GLFW_DECORATED, GLFW_TRUE);
window = glfwCreateWindow(1024, 768, "Client", NULL, NULL);
glfwSetWindowAttrib(window, GLFW_DECORATED, GLFW_TRUE);
if (!window) {
glfwTerminate();
return -1;
@ -42,7 +45,6 @@ int main(int argc, char** argv)
return 1;
}
// Setup Dear ImGui context
IMGUI_CHECKVERSION();
ImGui::CreateContext();