Skip to content
Snippets Groups Projects
Commit 7bfd0345 authored by Alexandros Frantzis's avatar Alexandros Frantzis
Browse files

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: default avatarAlexandros Frantzis <alexandros.frantzis@collabora.com>
parent 1ebcef52
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment