Skip to content

Conversation

@AKArien
Copy link
Contributor

@AKArien AKArien commented Jan 19, 2026

Fixes memory leaks in the various widgets. Mostly happened when reloading the configuration by not disconnecting signals, but in the case of the menu widget, there were also leaks for each show/hide.

For the rest that is on this branch, i’m fully prepared to hear it’s out of the scope of this pr, but oh well, that’s what git cherry-pick is for :

  • #pragma once instead of ifdefs
  • remove pointless includes
  • use <> for includes from libraries and "" for wf-shell headers
  • split WayfireMenu::update_popover_layout into it and setup_popover_layout for clarity
  • change hbox to box in WayfireStatusNotifier

@AKArien AKArien marked this pull request as draft January 19, 2026 16:08
@AKArien
Copy link
Contributor Author

AKArien commented Jan 19, 2026

Marking as draft, as the tray widget still has a memory leak when reloaded, and i’ve not gotten to test the notifications and command-output changes.

@trigg
Copy link
Collaborator

trigg commented Jan 19, 2026

Overall looks very good. Ran and did some testing and see no negatives.

Tray in its current incarnation is an abomination I designed with no previous understanding of dbus, I'm not too surprised it has leaks.

@AKArien AKArien changed the title Fix memory leaks ; style Fix memory leaks ; remove useless headers ; use pragma once ; renames of variables herited from gtk3 ; removed unused stuff Jan 19, 2026
Memory was leaked when the menu of the `menu` widget was shown/hidden,
and when reloading the widget.
In menu widget, properly delete widgets.
Everywhere, ensure all the signal handlers get properly disconnected.
In menu widget, separated update_popover_layout into itself and a setup function
In a few widgets, replaced names hbox and vbox inherited from gtk3 version to box
@AKArien AKArien marked this pull request as ready for review January 20, 2026 14:10
@AKArien
Copy link
Contributor Author

AKArien commented Jan 20, 2026

@trigg made a clean history, and i think that’s all for me.
There is still what i think is a memory leak, as i doubt that’s intended behaviour, but in the notifications widget, i don’t think any memory that is taken when recieving a notification is ever freed. i think it will have to wait for a better soul to fix it, because i can’t say i understand it.
I also did the hbox->box style change in menu and notifications widget.

Copy link
Collaborator

@trigg trigg left a comment

Choose a reason for hiding this comment

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

Sorry about the delay, LGTM.

Tried each and no issues found.

@trigg trigg merged commit 15cdf9e into WayfireWM:master Jan 20, 2026
2 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.

2 participants