SUMMARY The xdg-desktop-portal specification allows programs to request a modal file chooser dialog, but the KDE implementation creates a non-modal dialog regardless of the flag. STEPS TO REPRODUCE This happens no matter what the application, but it can easily be seen in Firefox. 1. In a terminal, enter `GTK_USE_PORTAL=1 firefox`. 2. When Firefox opens, press Ctrl+S to open the save dialog. The dialog should be the KDE portal one. 3. Attempt to click on the main program window while the dialog is still open. OBSERVED RESULT The window is not modal and can still be interacted with. This could lead to unexpected behaviour in applications which don't expect the application to be modified by the user once the dialog is open. EXPECTED RESULT The window should be blocked from interaction until the file dialog is closed. This is the behaviour when the portal is not active, and also the behaviour of the gtk and gnome implementations of the portal. SOFTWARE/OS VERSIONS KDE neon unstable 20221204-1117 KDE Plasma Version: 5.26.80 KDE Frameworks Version: 5.101.0 Qt Version: 5.15.7
Turns out my previous comment wasn't quite right. The gtk and gnome portal implementations don't make a modal dialog unless the desktop is Gnome. I guess this needs to be implemented in the window manager instead.
Is this on X11 or Wayland? or both?
I just checked again and it happens on both, although there is a difference between the two. On Wayland, the file dialog has its own taskbar icon and it can go behind the application window, while on X11 it doesn't have an icon and always stays on top.
This has been fixed in GTK 4.10.