keepassxreboot / keepassxc

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

Increase the time interval for window show workaround #10928

Closed hramrach closed 1 week ago

hramrach commented 2 weeks ago

The interval in the workaround for showing the window is too short, extend it.

Previously I was using an old system and running a patched version of keepassxc. However, now I am running a modern system and the existing value is not sufficient.

Testing strategy

Tried showing the keepasxc window by clicking the tray icon several times.

Unlike with the previous interval which makes it possible to show the window once in several attempts with the new interval it works reliably

Type of change

michaelk83 commented 2 weeks ago

Could this be related to #10902 and #10700 on Linux? (Those two are similar to each other, but not quite the same AFAICT - one is clicking the icon to toggle, one is clicking the "Toggle" action on the icon menu.)

hramrach commented 2 weeks ago

Could this be related to #10902 and #10700 on Linux? (Those two are similar to each other, but not quite the same AFAICT - one is clicking the icon to toggle, one is clicking the "Toggle" action on the icon menu.)

Unclear. There is a lot of different problems with the hide function, and a lot is WM dependent.

Hopefully by now all calls that show the window do the same so there should be no difference between clicking the icon or the menu.

With some debugging prints I was able to see that a hide event is dispatched just after the window is shown, and I improved the workaround for this case over time.

Other cases might have completely different root cause, and can be sometimes aggravated by this issue.

In my case it seems the tiling WM first hides the current windows and then shows the other. With a terminal this is instanteous, showing a web browser makes the desktop background visible momentarily, showing keepassxc makes the desktop background visible for much longer.

There are other applications that show windows from a tray icon without problems so there must be some specific problem with keepassxc or qt.

My knowledge of GUI programming is only rudimentary, end even less for Qt so I resigned to expanding on an exsiting workaround rather than fixing the root cause.

michaelk83 commented 1 week ago

platform: Linux

Oops, I thought this fix was on Windows. Didn't see the "n" in the ifndef.