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

bar: finalize drawer before recreating it #4842

Merged
merged 1 commit into from
May 26, 2024

Conversation

tych0
Copy link
Member

@tych0 tych0 commented May 26, 2024

If the drawer previously existed, we need to .finalize() it, or we'll leak its resources.

The comment about the stated reason for this is a little strange: we have width and height setters here, can we not just set them and not re-create the drawer at all? Thoughts welcome.

This is another leak that I found while looking for the source of #4821.

@tych0 tych0 mentioned this pull request May 26, 2024
2 tasks
@elParaguayo
Copy link
Member

If there is a drawer already then resizing it should work. The X11 backend finishes the existing XCBSurface when dimensions are changed so, I agree, just resetting dimensions may be neater.

...instead, just resize it. If we re-create it, we'll leak the resources
attached, and that's bad.

This is another leak that I found while looking for the source of qtile#4821.

Signed-off-by: Tycho Andersen <tycho@tycho.pizza>
@tych0
Copy link
Member Author

tych0 commented May 26, 2024

Ok, I switched it to just set width+height if it already exists. Hopefully it looks reasonable now?

Copy link
Member

@elParaguayo elParaguayo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

@tych0 tych0 merged commit a7f5d1c into qtile:master May 26, 2024
17 checks passed
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.

None yet

2 participants