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

fix: system tray causing crash on linux #233

Merged
merged 1 commit into from
Jun 24, 2024

Conversation

Merrit
Copy link
Contributor

@Merrit Merrit commented May 29, 2024

The system_tray package appears abandoned, with no update or comments for 13 months. The issue this PR fixes is due to a known bug in the system_tray package: antler119/system_tray#64

This PR replaces the system_tray package with the tray_manager package, which is actively maintained and doesn't cause the crash. tray_manager has beem around for 3+ years and had a release just 11 days ago. tray_manager is also a sibling package to the window_manager package already being used.

Resolves #232

The
[system_tray](https://pub.dev/packages/system_tray)
package appears abandoned, with no update or
comments for 13 months. The issue this PR fixes
is due to a known bug in the system_tray package:
antler119/system_tray#64

This PR replaces the system_tray package with the
[tray_manager](https://pub.dev/packages/tray_manager)
package, which is actively maintained and doesn't
cause the crash. `tray_manager` has beem around
for 3+ years and had a release just 11 days ago.

Resolves anandnet#232
Comment on lines +88 to +108
@override
void onTrayIconMouseDown() {
if (GetPlatform.isWindows) {
windowManager.show();
} else {
trayManager.popUpContextMenu();
}

super.onTrayIconMouseDown();
}

@override
void onTrayIconRightMouseDown() {
if (GetPlatform.isWindows) {
trayManager.popUpContextMenu();
} else {
windowManager.show();
}

super.onTrayIconRightMouseDown();
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm not certain this is the click behaviour we want, I simply reproduced what we currently had.

Personally, I think left-click to show/hide and right-click for context menu sounds quite appropriate and expected (speaking as a full-time Linux user).

@anandnet anandnet merged commit d27153f into anandnet:main Jun 24, 2024
1 check 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.

Crashes on Linux at InitSystemTray
2 participants