desktop-shell: make sure child window stays active

Graphics / Wayland / Weston - Stefan Agner [agner.ch] - 13 January 2020 12:18 EST

If a xdg_toplevel surface has a child (or multiple), the desktop shell still allows to activate the parent. This can be problematic with modal dialogs such as message boxes which then are hidden behind the main window, which might be non-responsive to inputs at this this point.

The protocol specifies set_parent as follows: "Set the 'parent' of this surface. This surface should be stacked above the parent surface and all other ancestor surfaces."

Track parent/child relationship in desktop-shell. Follow the protocol recommendation and make sure the child stays stacked above the parent.

Fixes: #231

a8da2084 desktop-shell: make sure child window stays active
desktop-shell/shell.c | 53 ++++++++++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 52 insertions(+), 1 deletion(-)

Upstream: cgit.freedesktop.org


  • Share