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

Correct issues with system tray icon #5948

Merged
merged 1 commit into from
Jan 27, 2021
Merged

Conversation

droidmonkey
Copy link
Member

Screenshots

Testing strategy

Tested on Windows and XFCE

Type of change

  • ✅ Bug fix (non-breaking change that fixes an issue)

* Close #5780 - Show window title as system tray icon tooltip
* Fix #5943 - Try to show system tray icon up to 5 times, waiting 5 seconds between attempts, if the system tray is not available. This works around observed startup issues on Linux.
* Change function of "isTrayIconEnabled()" to return true if the tray icon is created and visible. This may correct some long standing bugs with the window hiding forever unexpectedly.

m_trayIcon->setToolTip(windowTitle().replace("[*]", isWindowModified() ? "*" : ""));
Copy link
Member

Choose a reason for hiding this comment

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

Can we somehow construct the tooltip from the original raw title + an asterisk? Updating the existing title will replace any asterisks appearing in the database name. We should never read anything back from the UI.

Copy link
Member Author

Choose a reason for hiding this comment

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

That is the explicit placeholder for the modified indicator. It's a stupid qt convention and they keep the placeholder intact for some reason.

Copy link
Member

Choose a reason for hiding this comment

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

Hmm. I really don't like it, but so be it.


if (!isTrayIconEnabled() || !QSystemTrayIcon::isSystemTrayAvailable()) {
// Try to show tray icon after 5 seconds, try 5 times
// This can happen if KeePassXC starts before the system tray is available
Copy link
Member

Choose a reason for hiding this comment

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

I wonder if there are DBus signals we can listen for.

Copy link
Member Author

Choose a reason for hiding this comment

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

That is Qt's job which it is failing at doing (that's actually their bug as reported). This works and isn't too bothersome.

Copy link
Member

Choose a reason for hiding this comment

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

It's definitely Qt's job to do it right, but we might find a more elegant workaround in the future perhaps.

Copy link
Member Author

@droidmonkey droidmonkey Jan 27, 2021

Choose a reason for hiding this comment

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

I'd agree to that :-)

@droidmonkey droidmonkey merged commit 35d215a into release/2.6.4 Jan 27, 2021
@droidmonkey droidmonkey deleted the hotfix/tray-icon branch January 27, 2021 15:26
phoerious added a commit that referenced this pull request Jan 31, 2021
Added

- Automatically adapt to light/dark system theme changes (Windows/macOS only) [#6034]

Changed

- Show window title as tooltip on system tray [#5948]
- Compress Snap release as LZO for faster initial startup [#5877]
- Password generator: Set maximum selectable password length to 999 [#5937]

Fixed

- Fix crash on app close when using SSH agent [#5935]
- Fix KDF selection showing wrong item when using Argon2id [#5923]
- Automatically close About dialog on database lock if it is still open [#5947]
- Linux: Fix automatic launch at system startup with AppImages [#5901]
- Linux: Fix click-to-move on empty area activating when using menus [#5971]
- Linux: Try multiple times to show tray icon if tray is not ready yet [#5948]
- macOS: Fix KeePassXC blocking clean shutdown [#6002]
aswild added a commit to aswild/keepassxc that referenced this pull request Feb 5, 2021
Release 2.6.4

Added

- Automatically adapt to light/dark system theme changes (Windows/macOS only) [keepassxreboot#6034]

Changed

- Show window title as tooltip on system tray [keepassxreboot#5948]
- Compress Snap release as LZO for faster initial startup [keepassxreboot#5877]
- Password generator: Set maximum selectable password length to 999 [keepassxreboot#5937]

Fixed

- Fix crash on app close when using SSH agent [keepassxreboot#5935]
- Fix KDF selection showing wrong item when using Argon2id [keepassxreboot#5923]
- Automatically close About dialog on database lock if it is still open [keepassxreboot#5947]
- Linux: Fix automatic launch at system startup with AppImages [keepassxreboot#5901]
- Linux: Fix click-to-move on empty area activating when using menus [keepassxreboot#5971]
- Linux: Try multiple times to show tray icon if tray is not ready yet [keepassxreboot#5948]
- macOS: Fix KeePassXC blocking clean shutdown [keepassxreboot#6002]
@phoerious phoerious added pr: bugfix Pull request that fixes a bug and removed bug labels Nov 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr: bugfix Pull request that fixes a bug ux
Projects
None yet
2 participants