Skip to content

Commit

Permalink
Fixed MacOS bug - texture going under imgui menubar after moving window.
Browse files Browse the repository at this point in the history
  • Loading branch information
MeGaL0DoN committed Sep 26, 2024
1 parent 37c84ca commit d7eddf6
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -502,6 +502,11 @@ void framebuffer_size_callback(GLFWwindow* window, int width, int height)
glViewport(0, 0, viewport_width, viewport_height);
}

void window_pos_callback(GLFWwindow* window, int x, int y)
{
glViewport(0, 0, viewport_width, viewport_height);
}

void window_refresh_callback(GLFWwindow* _window)
{
(void)_window;
Expand Down Expand Up @@ -577,6 +582,7 @@ bool setGLFW()

glfwSetFramebufferSizeCallback(window, framebuffer_size_callback);
glfwSetWindowRefreshCallback(window, window_refresh_callback);
glfwSetWindowPosCallback(window, window_pos_callback);
glfwSetKeyCallback(window, key_callback);
glfwSetDropCallback(window, drop_callback);

Expand Down

0 comments on commit d7eddf6

Please sign in to comment.