Keepassxc: Window not brought to front when unlock request sent while in system tray

Created on 5 Mar 2018  Â·  26Comments  Â·  Source: keepassxreboot/keepassxc

Expected Behavior

Hitting alt + shift + u should bring up the unlock dialog of the database is locked

Current Behavior

Currently I just get a desktop notification (from gnome itself) that the keepassxc application is "ready", if I click that it comes to the foreground. It would be good if there would be no need to click the notification.

Steps to Reproduce (for bugs)

  1. Hit alt + shift + u/p in a text input in the browser while the database is locked and the window is behind the browser…

Debug Info


KeePassXC - 2.3.0
Revision: 54176b6

Libraries:

  • Qt 5.9.2
  • libgcrypt 1.8.1

Operating system: Debian GNU/Linux buster/sid
CPU architecture: x86_64
Kernel: linux 4.15.0-1-amd64

Enabled extensions:

  • Auto-Type
  • Browser Integration
  • Legacy Browser Integration (KeePassHTTP)
  • SSH Agent
  • YubiKey
bug Windows user interface

All 26 comments

Might I add: consider creating a separate smaller dialogue for entering the master password.
Currently the KeePassXC window is opened, demanding a lot of desktop canvas. A smaller login window (dialogue) would be more friendly to the canvas.
Also, this login dialogue could be opened (on top of all other windows) upon starting KeePassXC, drawing the user's attention to the master password. On my PC, KeePassXC is set to start automatically, yet it does so quietly in the system tray. (my setting)
A more refined startup mode could be "Start automatically in systray, yet do open the master password dialogue on top."

We do bring KeePassXC to the front. If it doesn't work properly, it's most likely your window manager not allowing Windows popping up above others. This problem is especially apparent on Windows.

@phoerious Ok, I'll try debugging it; it generally does work -- ie the autotype shortcut does bring the unlock dialog to the front properly, maybe that codepath could be reused for the extension here too.

This happens to me every time on Windows using chrome. Usually my kpxc is hidden to tray icon.

When it's hidden to the tray, it should appear as a blinking button in the task bar.

And it does, which is annoying. I would much prefer it come to the front.

I haven't noticed any blinking, which probably is exactly the point @droidmonkey is making.
Also the taskbar can be hidden and then even an observant user will not notice it.
A small, elegant password dialogue forced on top of the other windows really is a preferrable enhancement

We are raising the main Window, but Windows prevents us from pushing it all he way to the front. So often times, there is just an indicator in the task bar (and yes, that should flash or at least have a different colour). What I might check is if we are actually unmininizing correctly, but I would guess so, otherwise it'd stay in the tray.

Okay, flashing KPXC icon confirmed, also when KPXC was hidden in the systray.
I agree that this issue plays with other apps as well, including Windows own "Elevated User" prompt when confirmation of Administrator rights is required. I'm not a programmer (anymore), but isn't there a solution somewhere in the Windows programmers' community?

There is a registry hack, but it's global and applies to all applications.

Neh, not desirable :-(
So, Windows (10) would appear to be missing the functionality to open a dialogue on top of the other windows?
Can something be donte through the Notifications, but I don't believe its possible to throw up a Notification where one can immediately enter a form field, is it?

@phoerious Qt seems to work around that https://codereview.qt-project.org/#/c/142635/

@phoerious After testing a little bit more I realized the following interesting behaviour: Clicking on "reopen database" once brings up the gnome notification dialog, but clicking on it immediately a second time will raise it as expected

I think it depends on which application has the focus or is in foreground already.

Given that autotype always worked, I tried something simple:

diff --git a/src/browser/BrowserService.cpp b/src/browser/BrowserService.cpp
index fb89e8bc..2e4d8b26 100644
--- a/src/browser/BrowserService.cpp
+++ b/src/browser/BrowserService.cpp
@@ -81,7 +81,8 @@ bool BrowserService::openDatabase(bool triggerUnlock)
     }

     if (triggerUnlock) {
-        KEEPASSXC_MAIN_WINDOW->bringToFront();
+        dbWidget->showUnlockDialog();
+        //KEEPASSXC_MAIN_WINDOW->bringToFront();
     }

     return false;

This results in the dialog getting opened properly all the time.

The extension https://github.com/tak0kada/gnome-shell-extension-stealmyfocus for Gnome properly brings up the window :)

@apollo13 is this fix working in Windows 10? I get the annoying behavior of Keepassxc with Ctrl-Alt-K (my shortcut to access the DB) raising to the background and blinking when it's minimized to the tray - every single day at work.

At home, on Linux, I get a different annoyance - 'Window is Ready' but I am sure I'll be able to fix it with the extension you linked above (thanks!).

So hereby a request to please merge the fix above assuming it works :)

I do not use keepass on Windows. No idea...

On August 21, 2018 9:58:13 PM GMT+02:00, Ari notifications@github.com wrote:

@apollo13 is this fix working in Windows 10? I get the annoying
behavior of Keepassxc with Ctrl-Alt-K (my shortcut to access the DB)
raising to the background and blinking when it's minimized to the tray

  • every single day at work.

At home, on Linux, I get a different annoyance - 'Window is Ready' but
I am sure I'll be able to fix it with the extension you linked above
(thanks!).

So hereby a request to please merge the fix above assuming it works :)

--
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub:
https://github.com/keepassxreboot/keepassxc/issues/1643#issuecomment-414801776

As of 2.4.0 this only occurs on Windows.

Hi, this issue is still present on

KeePassXC - 2.4.3
KeePassXC-Browser - 1.5.1
Operating system: Win32
Browser: Mozilla Firefox 69.0

Clicking reopen does not raise the window to foreground

The issue is present also in Ubuntu 19.10. After clicking on "Reopen database" in Google Chrome browser extension, only a notification appears and KeePassXC window remains minimized in dock.

KeePassXC-Browser Version: 1.5.3

KeePassXC - Version 2.5.0
Revision: 1ab8a9f

Qt 5.12.4
Debugging mode is disabled.

Operating system: Ubuntu 19.10
CPU architecture: x86_64
Kernel: linux 5.3.0-19-generic

Enabled extensions:

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

Cryptographic libraries:
libgcrypt 1.8.4

Could someone re-open this bug?

That's an entirely different issue

As of 2.4.0 this only occurs on Windows.

Is there an open issue for that? On windows 8.1 the app appears in taskbar and is blinking but I need it to come in front. Does not make sense otherwise.

Yes there is

Yes there is

4502 maybe?

Precisely

Was this page helpful?
0 / 5 - 0 ratings