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

Fixed a new case of high CPU usage with scaling #1930

Closed
wants to merge 1 commit into from

Conversation

tsujan
Copy link
Member

@tsujan tsujan commented Aug 23, 2023

… by removing LXQtTaskButton::refreshIconGeometry, for which I found no use. The high CPU usage was a result of a recent change — or perhaps bug — in KWindowSystem.

Fixes #1926

EDIT: As @palinek explained later, LXQtTaskButton::refreshIconGeometry is for WM minimizing animations, like KWin's "magic lamp".

… by removing `LXQtTaskButton::refreshIconGeometry`, for which I found no use. The high CPU usage was a result of a recent change — or perhaps bug — in `KWindowSystem`.

Fixes #1926
@tsujan tsujan requested a review from palinek August 23, 2023 10:44
@palinek
Copy link
Contributor

palinek commented Aug 27, 2023

by removing LXQtTaskButton::refreshIconGeometry, for which I found no use.

IIRC this was for the minimize/maximize animation (to allow WM do fancy animation beginning/ending in the taskbar button area).

@tsujan
Copy link
Member Author

tsujan commented Aug 27, 2023

IIRC this was for the minimize/maximize animation (to allow WM do fancy animation beginning/ending in the taskbar button area).

But we know that WM animations are independent of any task-bar. Also, a WM determines where its title-bar icons are — in case this is about them.

It's strange to me that such a code doesn't have a single comment.

@palinek
Copy link
Contributor

palinek commented Aug 27, 2023

But we know that WM animations are independent of any task-bar.

Then WM can't do the minimizing effect "shrink into the taskbar icon".

WM determines where its title-bar icons are — in case this is about them.

This is not about determining, where the window icon is. But this is about information, where the taskbar icon is.

@tsujan
Copy link
Member Author

tsujan commented Aug 27, 2023

Then WM can't do the minimizing effect "shrink into the taskbar icon".

Oh, thanks! Now I get it.

Without that code, KWin does it here when a window is minimized by clicking its task button (and that's what I do out of habit); otherwise, when the minimize title-bar button is clicked, the "magic lamp" animation shrinks the window into the cursor position. IMO, if we keep the code, we should add a short comment to it.

Anyway, the bug is nasty — it makes the panel unusable with scale factors. On the other hand, I like animations and don't want to ruin them ;) Leaving this PR open until a stable compromise is found... But it should be done before 1.4.0.

@tsujan
Copy link
Member Author

tsujan commented Aug 27, 2023

Done in #1931

@tsujan tsujan closed this Aug 27, 2023
@tsujan tsujan deleted the refreshIconGeometry branch August 27, 2023 09:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

High CPU load in case of QT_SCALE_FACTOR > 1
2 participants