keepassxreboot / keepassxc

KeePassXC is a cross-platform community-driven port of the Windows application “Keepass Password Safe”.
https://keepassxc.org/
Other
20.94k stars 1.45k forks source link

The main window does not appear when it is toggled from a hidden state #10700

Open caesarw opened 4 months ago

caesarw commented 4 months ago

Overview

KeePassXC main window does not appear when it is toggled from a hidden state.

Steps to Reproduce

  1. Start KeePassXC (under XWayland, with the option Minimize window at application startup enabled)
  2. Click Toggle window in the tray

Expected Behavior

After clicking Toggle window, the main window should show up.

Actual Behavior

The main window did not appear. It showed up for a brief moment and then disappeared (see the screencast attached).

https://github.com/keepassxreboot/keepassxc/assets/11749340/97f5330f-ad42-4d20-9439-c7700877d329

Context

Debug info:

KeePassXC - Version 2.7.7
Revision: 68e2dd8

Qt 5.15.13
Debugging mode is disabled.

Operating system: Arch Linux
CPU architecture: x86_64
Kernel: linux 6.8.9-arch1-1

Enabled extensions:
- Auto-Type
- Browser Integration
- Passkeys
- SSH Agent
- KeeShare
- YubiKey
- Secret Service Integration

Cryptographic libraries:
- Botan 3.4.0
Faebu93 commented 4 months ago

I experienced the same issue. I found the setting 'Hide window to system tray when minimised' to be the culprit. If this setting is disabled, it works again for me. I have not tried, if it depends also on the other UI settings. With these UI settings I am experiencing the bug:

[GUI]
MinimizeOnClose=true
MinimizeOnStartup=true
MinimizeToTray=true
ShowTrayIcon=true
TrayIconAppearance=monochrome-light

To fix your KeepassXC installation, edit your settings file (in Linux it is located under ~/.config/keepassxc/keepassxc.ini) and set the value MinimizeToTray to false.

I am on Linux Manjaro, installed KeePassXC from the Manjaro Package Repository, am on Gnome 46.

The problem started to appear after the update to Gnome 46 and from keepassxc 2.7.6-3 to 2.7.7-2, not sure which one caused the issue.

Thanks for all the good work, I love the project!

droidmonkey commented 4 months ago

This seems much more a gnome issue than ours. We haven't changed anything related to that setting in a long time. Plus it works perfectly fine everywhere else.

mtompkins commented 4 months ago

I can confirm this abnormality on Gnome and X11. At launch it will toggle, but arbitrarily it will cease responding to a toggle invocation.

If I exit and restart KPXC, the toggle then performs as expected.

It may indeed be an upstream gnome issue, but it does impact others so I am pushing back on "it works perfectly fine everywhere else" as it does not.

droidmonkey commented 4 months ago

When I say it works perfectly fine everywhere else I am referring to everywhere that is not gnome.

thomas725 commented 3 months ago

I am using KDE Plasma 6 desktop. With X11 the minimizing to tray stuff all works perfectly fine.

But with wayland (which I prefer for better high DPI handling) there are several issues:

The second described point also causes a similar behavior to the one described by @caesarw in his original post, when the window is currently open on a different virtual desktop: It can't hide it from there (because it's not currently active) and therefore it can't reopen it on the current virtual desktop on a second click. That's how it works with X11.