Skip to content

Commit

Permalink
internal/glfw: bug fix: too early event emitting
Browse files Browse the repository at this point in the history
This change applies the bug fix at glfw/glfw#2046.
  • Loading branch information
hajimehoshi committed Apr 14, 2024
1 parent 4dfb3d2 commit 6ff9e2b
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions internal/glfw/x11_window_linbsd.c
Original file line number Diff line number Diff line change
Expand Up @@ -1600,16 +1600,16 @@ static void processEvent(XEvent *event)
if (event->xconfigure.width != window->x11.width ||
event->xconfigure.height != window->x11.height)
{
window->x11.width = event->xconfigure.width;
window->x11.height = event->xconfigure.height;

_glfwInputFramebufferSize(window,
event->xconfigure.width,
event->xconfigure.height);

_glfwInputWindowSize(window,
event->xconfigure.width,
event->xconfigure.height);

window->x11.width = event->xconfigure.width;
window->x11.height = event->xconfigure.height;
}

int xpos = event->xconfigure.x;
Expand Down Expand Up @@ -1637,9 +1637,10 @@ static void processEvent(XEvent *event)

if (xpos != window->x11.xpos || ypos != window->x11.ypos)
{
_glfwInputWindowPos(window, xpos, ypos);
window->x11.xpos = xpos;
window->x11.ypos = ypos;

_glfwInputWindowPos(window, xpos, ypos);
}

return;
Expand Down

0 comments on commit 6ff9e2b

Please sign in to comment.