desktop-shell: make sure child window stays active
authorStefan Agner <stefan@agner.ch>
Sun, 23 Jun 2019 12:53:59 +0000 (14:53 +0200)
committerStefan Agner <stefan@agner.ch>
Mon, 13 Jan 2020 12:18:00 +0000 (13:18 +0100)
commita8da208453ccc748bf331e83956b85d43ef0f05f
treed0870d3ddbb18211219ee6998740ff5a5e3a51f0
parent105e0b9c2711b09b1ee655fb40d6c13a79945ff3
desktop-shell: make sure child window stays active

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
Signed-off-by: Stefan Agner <stefan@agner.ch>
desktop-shell/shell.c