From f0ec791386b24bcea6210e37d9ad1c79b2722911 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Camilla=20L=C3=B6wy?= Date: Fri, 16 Feb 2024 11:59:51 +0100 Subject: [PATCH] X11: Cleanup The actual reported bug was fixed at some point during the refactoring of the Wayland backend. This is only a bit of tidying. Updating the cache before emitting events is always a nice thing to do. Closes #2046 --- CONTRIBUTORS.md | 1 + src/x11_window.c | 9 +++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 5d68bb77..855df93e 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -168,6 +168,7 @@ video tutorials. - Pascal Muetschard - James Murphy - Julian Møller + - Julius Häger - Nat - NateIsStalling - ndogxj diff --git a/src/x11_window.c b/src/x11_window.c index a94978cf..e0295465 100644 --- a/src/x11_window.c +++ b/src/x11_window.c @@ -1488,6 +1488,9 @@ 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); @@ -1495,9 +1498,6 @@ static void processEvent(XEvent *event) _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; @@ -1525,9 +1525,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;