Bug 450930

Summary: Can't close "Open with.." dialog when there's no suitable application installed
Product: [Plasma] xdg-desktop-portal-kde Reporter: MScattolin <matheus.scattolinanselmo>
Component: generalAssignee: Plasma Bugs List <plasma-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: aleixpol, jgrulich, jubyer2400, kde, nate
Priority: NOR    
Version: 5.24.2   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In: 5.25
Sentry Crash Report:
Attachments: "open with..." dialog

Description MScattolin 2022-02-27 17:04:43 UTC
Created attachment 147174 [details]
"open with..." dialog

SUMMARY
***
NOTE: If you are reporting a crash, please try to attach a backtrace with debug symbols.
See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***
The summary pretty much describes it, a screenshot is also attached.
You can't close the dialog by right-clicking the icon on the task manager either.

STEPS TO REPRODUCE
1. Download a file with no associated program installed through Firefox using xdg-desktop-portal
2. Open it through the browser

OBSERVED RESULT
An unclosable dialog will open with no suggestions. The "Show More" button will help if a suitable program is installed but not set, but it won't if you'd have to install it manually.
I've also tested and does not happen in chromium, it opens the same KIO dialog Dolphin does.

EXPECTED RESULT
Be able to close the dialog, install a suitable program elsewhere, and then try again.

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 5.16.11
(available in About System)
KDE Plasma Version: 5.24.2
KDE Frameworks Version: 5.91.0
Qt Version: 5.15.2

ADDITIONAL INFORMATION
Also there's an horizontal scrollbar at all times, even though there is no content.
Comment 1 Nate Graham 2022-03-09 21:03:11 UTC
There are multiple problems here:
1. You're on X11, so you're running into a known issue where QtQuick dialogs don't have a close button. This should be fixed by porting to Window instead
2. The window itself has no Cancel button, like most dialogs have. It should have one.
3. When no apps are listed in the main view, it should just show you the full list.
4. This whole dialog is silly; we should use the system's normal "Open With" dialog instead of reinventing the wheel but just for portals.

The first three issues are fixable within the current design, but fixing #4 would automatically fix them all, so IMO we should do that.
Comment 2 Nate Graham 2022-05-18 12:58:56 UTC
This should be fixed now with changes in Plasma 5.25.
Comment 3 Jubyer Ahmed Shezan 2022-07-30 17:58:33 UTC
For those who are also facing this problem.
Solution:
1. Right Click on "Open with.." dialog window's title bar.
2. Choose "Configure Special Window Settings" from "More Action".
3. Click "Add Property.." from bottom.
4. Add closeable option.
5. Choose closeable as "yes".
6. Now you can turn close the window.