Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MM-60233 - fix issue in kde of focus after minimize #3157

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

pvev
Copy link
Contributor

@pvev pvev commented Oct 3, 2024

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

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:

Screen.Recording.2024-10-03.at.22.28.39.mov

After:

Screen.Recording.2024-10-03.at.22.23.38.mov

Release Note

NONE

@pvev pvev requested a review from devinbinnie October 3, 2024 20:38
@pvev pvev added the 2: Dev Review Requires review by a core committer label Oct 3, 2024
@pvev pvev requested a review from larkox October 3, 2024 22:13
src/main/windows/mainWindow.ts Outdated Show resolved Hide resolved
@pvev pvev requested a review from devinbinnie October 10, 2024 22:56
@devinbinnie devinbinnie added the Build Apps for PR Builds signed builds for testing label Oct 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2: Dev Review Requires review by a core committer Build Apps for PR Builds signed builds for testing release-note
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Minimize button doesn't work in 5.9.0 on Kubuntu 24.04
4 participants