Keepassxc: Auto-type fails on Linux if "Hide window to system tray when minimized" enabled

Created on 7 Jul 2020  路  7Comments  路  Source: keepassxreboot/keepassxc

Overview

Auto-type was previously working for me with the KeePassXC snap, but as of the most recent update, window switching seems to fail when "Hide window to system tray when minimized" is enabled. This results in keypresses being registered in the KeePassXC window itself (sometimes opening dialogues or causing random changes to the database).

Steps to Reproduce

  1. On Ubuntu 20.04, open Ubuntu Software and install KeePassXC. This should use the snap (confirm this by opening a terminal and typing which keepassxc; the result should be /snap/bin/keepassxc).
  2. Open Settings > General > Basic Settings > User Interface and ensure that "Hide window to system tray when minimized" is checked.
  3. Create a new database and add an entry with a username and password.
  4. Open a text editor. Refocus KeePassXC and press Ctrl+Shift+V or select "Perform Auto-Type" from the entry context menu.

Expected Behavior

The entry is typed into the text editor window.

Actual Behavior

The KeePassXC window itself receives the keypresses. Entries may be modified, context windows may open, etc.

Context

KeePassXC - Version 2.6.0
Revision: 0765954
Distribution: Snap

Qt 5.9.5
Debugging mode is disabled.

Operating system: Ubuntu Core 18
CPU architecture: x86_64
Kernel: linux 5.4.0-40-generic

Enabled extensions:

  • Auto-Type
  • Browser Integration
  • SSH Agent
  • KeeShare (signed and unsigned sharing)
  • YubiKey
  • Secret Service Integration

Cryptographic libraries:
libgcrypt 1.8.1

Operating System: Linux
Desktop Env: Gnome
Windowing System: X11

Snap Auto-Type

Most helpful comment

Ctrl+Shift+V doesn't work for me as well on Ubuntu 20.04 (rep install) when the option "hide window when minimized" (translated) is enabled. If I disable this, Auto-Type works again.

All 7 comments

Incidentally, I've tried the solution proposed in #2081 -- adding a {DELAY 500} to the root entry -- but this doesn't make a difference.

I cannot replicate this problem. It worked for me, both Ctrl+Shift+V and Global Auto-Type, on Ubuntu 20.04 and Mint 19.03 (snap install).

Ctrl+Shift+V doesn't work for me as well on Ubuntu 20.04 (rep install) when the option "hide window when minimized" (translated) is enabled. If I disable this, Auto-Type works again.

Similar behaviour here, Auto-Type minimizes the window only for a short period before it comes back. As a result username and password are typed in the search field of KeepassXC instead of the fields it should be typed in.

Can confirm @Peac's solution fixes the issue for me.

I've accordingly modified the steps to repro the issue in my original post. @droidmonkey are you able to repro it now?

Yes can reproduce now, my gnome-shell-extension-appindicator decided to uninstall itself so I didn't have a tray icon anymore.

This bug was introduced by https://github.com/keepassxreboot/keepassxc/pull/4782, commenting out the "hide()" call in MainWindow::changeEvent() fixes it.

Was this page helpful?
0 / 5 - 0 ratings