Browse Source

Use popupParent as X11 parent window (#14366)

Previously, the popupParent was ignored when present causing popups to
have the X root window as its parent.

This cause issues on gamescope (SteamOS session compositor) where that window would end up behind the
main window.

Signed-off-by: Mary Guillemard <mary@mary.zone>
Co-authored-by: Max Katz <maxkatz6@outlook.com>
pull/14399/head
Mary Guillemard 2 years ago
committed by GitHub
parent
commit
0bde86b457
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 4
      src/Avalonia.X11/X11Window.cs

4
src/Avalonia.X11/X11Window.cs

@ -142,7 +142,9 @@ namespace Avalonia.X11
defaultWidth = Math.Max(defaultWidth, 300);
defaultHeight = Math.Max(defaultHeight, 200);
_handle = XCreateWindow(_x11.Display, _x11.RootWindow, 10, 10, defaultWidth, defaultHeight, 0,
var parentHandle = popupParent != null ? ((X11Window)popupParent)._handle : _x11.RootWindow;
_handle = XCreateWindow(_x11.Display, parentHandle, 10, 10, defaultWidth, defaultHeight, 0,
depth,
(int)CreateWindowArgs.InputOutput,
visual,

Loading…
Cancel
Save