Module: wine
Branch: master
Commit: e0591fafae210c303ccecb9dd481946cf806a68c
URL: https://gitlab.winehq.org/wine/wine/-/commit/e0591fafae210c303ccecb9dd48194…
Author: Alexandros Frantzis <alexandros.frantzis(a)collabora.com>
Date: Fri Oct 27 15:11:36 2023 +0300
winewayland.drv: Ignore spurious size hints.
Due to the asynchronous nature of Wayland events, and the design of the
xdg_toplevel protocol, an xdg configure event may be a reaction to a
request in the application's configuration past, and the size hint may
be out of date. For example:
1. The client commits a 100x100 buffer to a surface.
2.1 The compositor sends xdg configure(100x100, state=activated).
2.2 In the meantime, the client resizes and commits a 50x50 buffer.
3. The client receives the event from (2.1). If we respect the
size hint, we will resize back to 100x100, although this was
neither the client's nor the compositor's intention.
To mitigate this we ignore size hints for states that do not
require strict size adherence.
---
dlls/winewayland.drv/window.c | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/dlls/winewayland.drv/window.c b/dlls/winewayland.drv/window.c
index 8666a93f6c2..1423164834e 100644
--- a/dlls/winewayland.drv/window.c
+++ b/dlls/winewayland.drv/window.c
@@ -412,9 +412,18 @@ static void wayland_configure_window(HWND hwnd)
surface->processing = surface->requested;
memset(&surface->requested, 0, sizeof(surface->requested));
- width = surface->processing.width;
- height = surface->processing.height;
state = surface->processing.state;
+ /* Ignore size hints if we don't have a state that requires strict
+ * size adherence, in order to avoid spurious resizes. */
+ if (state)
+ {
+ width = surface->processing.width;
+ height = surface->processing.height;
+ }
+ else
+ {
+ width = height = 0;
+ }
if ((state & WAYLAND_SURFACE_CONFIG_STATE_RESIZING) && !surface->resizing)
{
Module: wine
Branch: master
Commit: 13578d60455b9200e9498172d96997cbd2ef2645
URL: https://gitlab.winehq.org/wine/wine/-/commit/13578d60455b9200e9498172d96997…
Author: Alexandros Frantzis <alexandros.frantzis(a)collabora.com>
Date: Tue Oct 24 15:40:00 2023 +0300
winewayland.drv: Prepare to handle different coordinate spaces.
Introduce and use functions to convert between the window logical and
Wayland surface coordinate spaces. At the moment the two are the same
but this will change with the introduction of scaling support.
---
dlls/winewayland.drv/wayland_pointer.c | 36 ++++++++++++++++--------
dlls/winewayland.drv/wayland_surface.c | 51 +++++++++++++++++++++++++++-------
dlls/winewayland.drv/waylanddrv.h | 6 ++++
dlls/winewayland.drv/window.c | 22 ++++++++++-----
4 files changed, 86 insertions(+), 29 deletions(-)