Improve smart hide

This commit is contained in:
reionwong 2021-09-05 01:55:41 +08:00
parent 87e03b6723
commit bf7921a171
2 changed files with 9 additions and 6 deletions

View file

@ -62,11 +62,6 @@ void Activity::onActiveWindowChanged()
bool launchPad = info.windowClassClass() == "cutefish-launcher";
if (m_launchPad != launchPad) {
m_launchPad = launchPad;
emit launchPadChanged();
}
if (DockSettings::self()->visibility() == DockSettings::IntellHide) {
bool existsWindowMaximized = false;
@ -88,6 +83,11 @@ void Activity::onActiveWindowChanged()
}
}
if (m_launchPad != launchPad) {
m_launchPad = launchPad;
emit launchPadChanged();
}
m_pid = info.pid();
m_windowClass = info.windowClassClass().toLower();
}

View file

@ -352,7 +352,8 @@ void MainWindow::onVisibilityChanged()
{
// Always show
// Must remain displayed when launchpad is opened.
if (m_settings->visibility() == DockSettings::AlwaysShow || m_activity->launchPad()) {
if (m_settings->visibility() == DockSettings::AlwaysShow
|| m_activity->launchPad()) {
m_hideTimer->stop();
setGeometry(windowRect());
@ -367,6 +368,8 @@ void MainWindow::onVisibilityChanged()
if (m_activity->launchPad())
return;
else
m_hideBlocked = false;
if (m_settings->visibility() == DockSettings::IntellHide) {
clearViewStruts();