mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 04:57:26 +01:00
internal/glfw: bug fix: too early event emitting
This change applies the bug fix at glfw/glfw#2046.
This commit is contained in:
parent
4dfb3d2fc1
commit
6ff9e2b44c
@ -1600,6 +1600,9 @@ static void processEvent(XEvent *event)
|
|||||||
if (event->xconfigure.width != window->x11.width ||
|
if (event->xconfigure.width != window->x11.width ||
|
||||||
event->xconfigure.height != window->x11.height)
|
event->xconfigure.height != window->x11.height)
|
||||||
{
|
{
|
||||||
|
window->x11.width = event->xconfigure.width;
|
||||||
|
window->x11.height = event->xconfigure.height;
|
||||||
|
|
||||||
_glfwInputFramebufferSize(window,
|
_glfwInputFramebufferSize(window,
|
||||||
event->xconfigure.width,
|
event->xconfigure.width,
|
||||||
event->xconfigure.height);
|
event->xconfigure.height);
|
||||||
@ -1607,9 +1610,6 @@ static void processEvent(XEvent *event)
|
|||||||
_glfwInputWindowSize(window,
|
_glfwInputWindowSize(window,
|
||||||
event->xconfigure.width,
|
event->xconfigure.width,
|
||||||
event->xconfigure.height);
|
event->xconfigure.height);
|
||||||
|
|
||||||
window->x11.width = event->xconfigure.width;
|
|
||||||
window->x11.height = event->xconfigure.height;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int xpos = event->xconfigure.x;
|
int xpos = event->xconfigure.x;
|
||||||
@ -1637,9 +1637,10 @@ static void processEvent(XEvent *event)
|
|||||||
|
|
||||||
if (xpos != window->x11.xpos || ypos != window->x11.ypos)
|
if (xpos != window->x11.xpos || ypos != window->x11.ypos)
|
||||||
{
|
{
|
||||||
_glfwInputWindowPos(window, xpos, ypos);
|
|
||||||
window->x11.xpos = xpos;
|
window->x11.xpos = xpos;
|
||||||
window->x11.ypos = ypos;
|
window->x11.ypos = ypos;
|
||||||
|
|
||||||
|
_glfwInputWindowPos(window, xpos, ypos);
|
||||||
}
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user