Skip to content

Commit

Permalink
hide window before init is done
Browse files Browse the repository at this point in the history
  • Loading branch information
tsl0922 committed Feb 11, 2023
1 parent 07b567e commit 9dd07e5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions source/window.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ bool Window::run(OptionParser& parser) {
player->onDropEvent(count, openedFileNames);
}
#endif
glfwShowWindow(window);
glfwFocusWindow(window);

std::atomic_bool shutdown = false;

Expand Down Expand Up @@ -161,6 +163,8 @@ void Window::initGLFW(const char* title) {
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 0);
glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE);
#endif
glfwWindowHint(GLFW_VISIBLE, GLFW_FALSE);
glfwWindowHint(GLFW_FOCUSED, GLFW_FALSE);

GLFWmonitor* monitor = glfwGetPrimaryMonitor();
const GLFWvidmode* mode = glfwGetVideoMode(monitor);
Expand Down

0 comments on commit 9dd07e5

Please sign in to comment.