MM-60233: Fix window minimizing issue on KDE/KWin environments. The app window was immediately being focus after being minimized, and it caused it to restore instead of stay minimized. This happened because the onFocus event was being triggered after minimizing, and then the actions within the onFocus handler was causing the window to re obtain the focus.
This PR resolves this by modifying the onFocus event handler by checking if the application was running on KDE/KWin (plasma) and if the window is also minimized. If both of the conditions are present, then the handler will return early and will not execute further actions avoiding the window to obtain focus unwanted.
Summary
MM-60233: Fix window minimizing issue on KDE/KWin environments. The app window was immediately being focus after being minimized, and it caused it to restore instead of stay minimized. This happened because the onFocus event was being triggered after minimizing, and then the actions within the onFocus handler was causing the window to re obtain the focus.
This PR resolves this by modifying the onFocus event handler by checking if the application was running on KDE/KWin (plasma) and if the window is also minimized. If both of the conditions are present, then the handler will return early and will not execute further actions avoiding the window to obtain focus unwanted.
Ticket Link
https://mattermost.atlassian.net/browse/MM-60233 Closes #3130
Checklist
npm run lint:js
for proper code formattingRun Desktop E2E Tests
Device Information
This PR was tested on: Kubuntu: Operating System: Kubuntu 24.04 KDE Plasma Version: 5.27.11 KDE Frameworks Version: 5.115.0 Qt Version: 5.15.13 Kernel Version: 6.8.0-45-generic (64-bit) Graphics Platform: X11 Processors: 2 Memory: 1.9 GiB of RAM Graphics Processor: virgl Manufacturer: Parallels International GmbH. Product Name: Parallels ARM Virtual Machine System Version: 0.1
Screenshots
Before:
https://github.com/user-attachments/assets/fde8432e-894c-47fd-b88a-eb7827303ea2
After:
https://github.com/user-attachments/assets/7931d933-99c8-46d0-a7e8-32a5a74df4c4
Release Note