winewayland.drv: Refine heuristics for relative positioning of windows.
Before this commit, the simple heuristic for using a Wayland subsurface
and relative positioning to display a window was: it doesn't have a
caption AND it has an owner.
Since many applications use unowned top-level windows for various kinds
of popups, this commit enhances our heuristic to detect such windows and
use relative positioning for them too. Since for such windows we don't
have a owner window, and thus a Wayland surface parent to attach them
to, we use the most recent surface the user interacted with as the
effective owner.
The updated heuristic is: If a window has an effective owner AND it's
not a child window AND it's not minimized AND it doesn't have a caption,
min/max buttons or sysmenu AND it's relatively small compared to the
monitor size THEN we use subsurface/relative positioning.
Signed-off-by: Alexandros Frantzis <alexandros.frantzis@collabora.com>
Showing
- dlls/winewayland.drv/wayland_keyboard.c 1 addition, 0 deletionsdlls/winewayland.drv/wayland_keyboard.c
- dlls/winewayland.drv/wayland_pointer.c 3 additions, 0 deletionsdlls/winewayland.drv/wayland_pointer.c
- dlls/winewayland.drv/waylanddrv.h 8 additions, 0 deletionsdlls/winewayland.drv/waylanddrv.h
- dlls/winewayland.drv/window.c 235 additions, 11 deletionsdlls/winewayland.drv/window.c
Loading
Please register or sign in to comment