Fix visibility

This commit is contained in:
reionwong 2021-09-08 00:12:09 +08:00
parent d9a5064ea6
commit ffe9852909

View file

@ -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);