Modal dialog does not stay on-top its parent
Showing a modal dialog (e.g. a message box) prevents interaction with the parent as expected. However, the parent window can still be clicked on which will put it in front of the (modal) child dialog.
One can still use the mouse to select the modal dialog again if the modal dialog is larger than the parent. However, the issue is especially problematic if the modal dialog is smaller. If one accidentally clicks to the parent it feels as if the application just froze (since interaction is not possible).
See also wayland-debug-client.txt, the output of a run using:
WAYLAND_DEBUG=client ./modalTest -platform wayland 2> wayland-debug-client.txt
The same issue appears to be the case when using dialogs created with the GTK3 toolkit (see screenshot of gtk3-demo).
I first reported this issue with Qt since I assumed this is a Qt bug (see QTBUG-75144). But it seems that the parent relationship is properly set, and the very same binary behaves as expected with Gnome Mutter as Wayland compositor. In this screenshot I clicked (and activated) the parent window, but the message box still stayed on-top:
The source code of the application can be found in this Qt Bug.