Bug 503064

Summary: Chromium Save as dialog (child window) is opened in the background instead of being forced to the foreground
Product: [Plasma] kwin Reporter: Lenzoid <strong.drum0546>
Component: compositingAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED DUPLICATE    
Severity: normal CC: john.kizer, strong.drum0546
Priority: NOR    
Version First Reported In: git master   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Lenzoid 2025-04-20 14:55:45 UTC
This bug is  reproducible on two machines, with both Chromium and Brave. X11 and Wayland are affected.

STEPS TO REPRODUCE

1. Open Chromium or Brave
2. Open any website, right-click "Save as..."
3. A new window appears, titled "Portal - All Files", a dialog that let's you choose the destination file path and file name. This new window is a new group and a different icon than brave in the task manager (task bar).
4. Focus on any other application
5. Focus on Chromium again (I clicked on its icon in the task bar).

OBSERVED RESULT
Chromium or "parent window" does appear to ignore mouse and keyboard inputs, but the window content is still updating. This was extremely confusing to me, since I tripped over this a couple of times during work hours. The file chooser dialog is in the background now, if you haven't seen it you're screwed, you just have to know that.

Why is this a problem? 
- If you don't see the dialog (my Portal window sometimes takes a while to come up due to disks spinning up in the background, annoyingly blocking the whole dialog until disk is up), you might think the browser is crashed. It has happened to me. It has caused loss of work at least once because I didn't get what the problem was and killed the browser. In any case it is just annoying to have a window ignore user input.

EXPECTED RESULT
It should show the Chromium Window and in the __foreground__ of the active, focused window, the file chooser should appear. It should re-focus that "child dialog" automatically.


SOFTWARE/OS VERSIONS
System Info Gaming PC 1 2025-04-19 

### Stable Arch + plasma workspace git-master
Operating System: Arch Linux 
KDE Plasma Version: 6.3.80
KDE Frameworks Version: 6.14.0
Qt Version: 6.9.0
Kernel Version: 6.14.2-arch1-1 (64-bit)
Graphics Platform: Wayland
Processors: 16 × AMD Ryzen 7 5700X3D 8-Core Processor
Memory: 32 GiB of RAM (31.3 GiB usable)
Graphics Processor: NVIDIA GeForce RTX 2070 SUPER
Manufacturer: Micro-Star International Co., Ltd.
Product Name: MS-7B85
System Version: 1.0

### System Info Gaming Laptop MSI Alpha 15 A3DD 

Operating System: Arch Linux 
KDE Plasma Version: 6.3.4
KDE Frameworks Version: 6.12.0
Qt Version: 6.9.0
Kernel Version: 6.14.2-arch1-1 (64-bit)
Graphics Platform: Wayland
Processors: 8 × AMD Ryzen 5 3550H with Radeon Vega Mobile Gfx
Memory: 13.6 GiB of RAM
Graphics Processor 1: AMD Radeon Vega 8 Graphics
Graphics Processor 2: AMD Radeon RX 5500M
Manufacturer: Micro-Star International Co., Ltd.
Product Name: Alpha 15 A3DD
System Version: REV:1.0

ADDITIONAL INFORMATION
In Gnome this is handled correctly. The Save as destination dialog is created as a "child window" of the browser. Re-focusing the browser brings back the child dialog.
Comment 1 John Kizer 2025-04-21 18:29:21 UTC
Hi - this looks like https://bugs.kde.org/show_bug.cgi?id=493647 , is that what you're seeing?
Comment 2 Lenzoid 2025-04-22 00:15:21 UTC
(In reply to John Kizer from comment #1)
> Hi - this looks like https://bugs.kde.org/show_bug.cgi?id=493647 , is that
> what you're seeing?

Thanks for your comment. It looks like that's it, yes. If the fix doesn't change things, I'll reopen. I will test new git-master soon.

*** This bug has been marked as a duplicate of bug 493647 ***