Skip to content

Fix leaks, related refactors and improvements#923

Merged
josuave merged 7 commits intomasterfrom
fix-leaks
Nov 6, 2025
Merged

Fix leaks, related refactors and improvements#923
josuave merged 7 commits intomasterfrom
fix-leaks

Conversation

@dremin
Copy link
Collaborator

@dremin dremin commented Nov 6, 2025

  • Fixed IShellLink leak
  • Introduced method to stop menu bar extension controls, so that they don't leak when a menu bar is closed
  • Fixed other misc menu extra leaks
  • Fixed menu commands event handler leak
  • Hotkeys improved:
    • Hotkeys are no longer managed within individual instances of controls, which was bad, and fixes misc issues including leaks
    • Hotkeys that open menus now open the one on the same monitor as the mouse, if multiple menu bars are present
    • Toggling the Cairo and programs menu are now implemented as commands, which the hotkeys invoke
  • Toggling menu bar items no longer requires Cairo restart
  • Moved search initialization outside of the search control
  • Hide search until initialized to prevent confusion

- Hotkeys are no longer managed within individual instances of controls, which was bad, and fixes misc issues including leaks
- Hotkeys that open menus now open the one on the same monitor as the mouse, if multiple menu bars are present
- Toggling the Cairo and programs menu are now implemented as commands, which the hotkeys invoke
- Introduced method to stop menu bar extension controls, so that they don't leak
- Toggling menu bar items no longer requires Cairo restart
- Fixed misc menu extra leaks
This only needs to be done once, rather than each time a control is created.
Hides search until initialized to prevent confusion.
@dremin dremin requested a review from josuave November 6, 2025 05:56

try
{
new HotKey(Key.S, HotKeyModifier.Win | HotKeyModifier.NoRepeat, OnShowSearchHotkey);
Copy link
Collaborator

Choose a reason for hiding this comment

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

We should look at making these hot keys configurable and settings. I believe clocks also had one that looked pretty hard coded. Just an observation not anything to block this pr

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Agreed! I started moving some of these to commands as I would like to allow users to freely configure hotkeys to trigger commands, and move all of these to that configurable system.

@josuave josuave merged commit 04eabc5 into master Nov 6, 2025
5 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