From b9daed20558103e3c8e799f3e0575522bf823df6 Mon Sep 17 00:00:00 2001 From: Michal Suchanek Date: Mon, 24 Feb 2020 12:33:43 +0100 Subject: Correct issues with hiding and minimizing the MainWindow The GUI features depend on windowing system used, not just OS. There is an issue with the WM sometimes producing an event that keepassxc interprets as request to hide the main window just after it is shown. A workaround with immediately firing a timer was implemented. However, there is no guarantee on execution ordering of the timer callback and other application code. Remove the timer and override show() and hide() on main window to only hide if the window has not been shown recently. The user can set an option to hide window instead of minimizing when tray icon is enabled. This is not honored in most places where the main windows is minimized. Fix it. This also allows using the tray icon as a workaround for minimization not working under some circumstances in X11. Signed-off-by: Michal Suchanek --- src/core/Clock.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/core/Clock.h') diff --git a/src/core/Clock.h b/src/core/Clock.h index 8f81b0961..4d1ee2537 100644 --- a/src/core/Clock.h +++ b/src/core/Clock.h @@ -28,6 +28,7 @@ public: static QDateTime currentDateTime(); static uint currentSecondsSinceEpoch(); + static qint64 currentMilliSecondsSinceEpoch(); static QDateTime serialized(const QDateTime& dateTime); -- cgit v1.2.3