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;
|
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_MAJOR, 3);
|
||||||
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 0);
|
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);
|
window = glfwCreateWindow(1024, 768, "Client", NULL, NULL);
|
||||||
glfwSetWindowAttrib(window, GLFW_DECORATED, GLFW_TRUE);
|
|
||||||
if (!window) {
|
if (!window) {
|
||||||
glfwTerminate();
|
glfwTerminate();
|
||||||
return -1;
|
return -1;
|
||||||
|
@ -42,7 +45,6 @@ int main(int argc, char** argv)
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Setup Dear ImGui context
|
// Setup Dear ImGui context
|
||||||
IMGUI_CHECKVERSION();
|
IMGUI_CHECKVERSION();
|
||||||
ImGui::CreateContext();
|
ImGui::CreateContext();
|
||||||
|
|
Loading…
Reference in New Issue