Bug 437993

Summary: Switching tabs order in Firefox causes the foregraund window to be replaced with the background window of VS Code (and vice-versa)
Product: [Plasma] kwin Reporter: Lyubomir <liubomirwm>
Component: wayland-genericAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED DOWNSTREAM    
Severity: normal CC: kde, nate, qydwhotmail
Priority: NOR Keywords: wayland-only
Version First Reported In: 5.21.90   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Lyubomir 2021-06-02 12:38:15 UTC
STEPS TO REPRODUCE

0. Use a Wayland Session
1. Have VS Code installed.
2. Start VS Code with the following command-line options "--enable-features=UseOzonePlatform --ozone-platform=wayland" or add them to the .desktop file for VS Code. If you use .desktop logout and login again in your account for KDE to refresh the .desktop entries cache.
3. Have VS Code running in a maximized window in the background
4. Have Firefox running in a maximized window in the foreground. Ensure Firefox shows/uses "wayland" as a window protocol in about:support
5. Have some number of open tabs in Firefox
6. Try to move/change the Firefox tabs order
7. Notice how the VS Code window in the background gets activated on release/end of dragging the Firefox tab

Screencast: https://youtu.be/xXJezyifxZo

SOFTWARE/OS VERSIONS
Operating System: Kubuntu 21.04
KDE Plasma Version: 5.21.90
KDE Frameworks Version: 5.82.0
Qt Version: 5.15.2
Kernel Version: 5.11.0-17-lowlatency (64-bit)
Graphics Platform: Wayland
Processors: 8 × Intel® Core™ i5-8250U CPU @ 1.60GHz
Memory: 7,6 GiB of RAM
Graphics Processor: Mesa Intel® UHD Graphics 620
Comment 1 Lyubomir 2021-06-28 14:39:02 UTC
I should add that although VS code is shown to foreground, it does not have focus when this issue happens.
Comment 2 Fushan Wen 2021-06-30 09:04:12 UTC
I cannot reproduce the issue on openSUSE Tumbleweed 20210628 with Plasma 5.22.2, Firefox 90.0b12 and VSCode 1.57.1
Comment 3 Lyubomir 2021-07-09 11:44:46 UTC
Hmm, today i experience the reverse - dragging tabs (on mouseup) in VS Code switches the foreground window to Firefox.
Comment 4 Lyubomir 2021-07-09 11:53:10 UTC
New issue screencast: https://youtu.be/QG2YPNBjT60
Comment 5 David Edmundson 2023-01-17 13:53:51 UTC
We had issues in the past with older firefox that were client issues. 
We haven't seen issues in newer firefox. Please let us know if a problem persists