From ffe98529097b9716e828b57ee9d08d2036d0e9af Mon Sep 17 00:00:00 2001 From: reionwong Date: Wed, 8 Sep 2021 00:12:09 +0800 Subject: [PATCH] Fix visibility --- src/mainwindow.cpp | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 3631a7e..2780eb3 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -320,7 +320,8 @@ void MainWindow::onPositionChanged() { initScreens(); - if (m_settings->visibility() == DockSettings::AlwaysHide) { + if (m_settings->visibility() == DockSettings::AlwaysHide || + m_settings->visibility() == DockSettings::IntellHide) { setVisible(false); initSlideWindow(); // Setting geometry needs to be displayed, otherwise it will be invalid. @@ -329,17 +330,7 @@ void MainWindow::onPositionChanged() updateViewStruts(); m_hideTimer->start(); - } - - if (m_settings->visibility() == DockSettings::AlwaysShow) { - setVisible(false); - initSlideWindow(); - setVisible(true); - setGeometry(windowRect()); - updateViewStruts(); - } - - if (m_settings->visibility() == DockSettings::IntellHide) { + } else if (m_settings->visibility() == DockSettings::AlwaysShow) { setVisible(false); initSlideWindow(); setVisible(true);