Add a note explaining why window decorations may be missing in wayland
This commit is contained in:
parent
5b1b7227f8
commit
b9b2b983cb
|
@ -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;
|
||||
|
@ -41,7 +44,6 @@ int main(int argc, char** argv)
|
|||
fprintf(stderr, "[GLAD] Error loading\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
// Setup Dear ImGui context
|
||||
IMGUI_CHECKVERSION();
|
||||
|
|
Loading…
Reference in New Issue