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

Re-register global D-Bus menu when restoring window from tray #276

Merged
merged 4 commits into from
Feb 10, 2017

Conversation

phoerious
Copy link
Member

@phoerious phoerious commented Feb 9, 2017

This resolves issue #271

Description

Ubuntu Unity unregisters global menus when the connected window is hidden. This leaves KeePassXC without a working menu bar when the the window is restored from the system tray.
This patch manually sends a D-Bus call to re-register the window. Unfortunately, it adds D-Bus as a direct dependency on Linux, but I couldn't find another working solution except for disabling native menus altogether.

How Has This Been Tested?

I compiled an AppImage with Qt 5.8 and tested it in an Ubuntu 16.04 virtual machine and on Arch with KDE Plasma 5.9. Plasma 5.9 has never had issues to begin with (because windows weren't automatically unregistered), but it also doesn't show duplicate menus or any other weird behavior after this patch.

Types of changes

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

Checklist:

  • ✅ I have read the CONTRIBUTING document. [REQUIRED]
  • ✅ My code follows the code style of this project. [REQUIRED]
  • ✅ All new and existing tests passed. [REQUIRED]

@phoerious phoerious added this to the v2.1.2 milestone Feb 9, 2017
@phoerious phoerious force-pushed the hotfix/271-dbus-menu-ubuntu branch 2 times, most recently from b376896 to 71784cd Compare February 9, 2017 14:55
@phoerious phoerious changed the title Re-register global D-Bus men when restoring window from tray Re-register global D-Bus menu when restoring window from tray Feb 9, 2017
@droidmonkey droidmonkey merged commit ef082c2 into release/2.1.2 Feb 10, 2017
@droidmonkey droidmonkey deleted the hotfix/271-dbus-menu-ubuntu branch February 10, 2017 02:23
phoerious added a commit that referenced this pull request Feb 17, 2017
- Ask for save location when creating a new database [#302]
- Remove Libmicrohttpd dependency to clean up the code and ensure better OS X compatibility [#317, #265]
- Prevent Qt from degrading Wifi network performance on certain platforms [#318]
- Visually refine user interface on OS X and other platforms [#299]
- Remove unusable tray icon setting on OS X [#293]
- Fix compositing glitches on Ubuntu and prevent flashing when minimizing to the tray at startup [#307]
- Fix AppImage tray icon on Ubuntu [#277, #273]
- Fix global menu disappearing after restoring KeePassXC from the tray on Ubuntu [#276]
- Fix result order in entry search [#320]
- Enable HiDPI scaling on supported platforms [#315]
- Remove empty directories from installation target [#282]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants