diff --git a/src/fakewindow.cpp b/src/fakewindow.cpp index be193bf..3c75f32 100644 --- a/src/fakewindow.cpp +++ b/src/fakewindow.cpp @@ -85,6 +85,8 @@ bool FakeWindow::event(QEvent *e) if (!m_delayedMouseTimer.isActive()) { m_delayedMouseTimer.start(); } + } else if (e->type() == QEvent::Show) { + KWindowSystem::setState(winId(), NET::SkipTaskbar | NET::SkipPager | NET::SkipSwitcher); } return QQuickView::event(e); diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 2c99296..9c3c1cd 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -146,9 +146,7 @@ QRect MainWindow::windowRect() const void MainWindow::resizeWindow() { setGeometry(windowRect()); - - if (m_settings->visibility() == DockSettings::AlwaysShow) - updateViewStruts(); + updateViewStruts(); emit resizingFished(); } @@ -169,7 +167,11 @@ void MainWindow::initSlideWindow() void MainWindow::updateViewStruts() { - XWindowInterface::instance()->setViewStruts(this, m_settings->direction(), geometry()); + if (m_settings->visibility() == DockSettings::AlwaysShow) { + XWindowInterface::instance()->setViewStruts(this, m_settings->direction(), geometry()); + } else { + clearViewStruts(); + } } void MainWindow::clearViewStruts() @@ -246,11 +248,13 @@ void MainWindow::onIconSizeChanged() void MainWindow::onVisibilityChanged() { + updateViewStruts(); + // Always show if (m_settings->visibility() == DockSettings::AlwaysShow) { setGeometry(windowRect()); setVisible(true); - updateViewStruts(); + // updateViewStruts(); // Delete fakewindow if (m_fakeWindow) { @@ -260,7 +264,7 @@ void MainWindow::onVisibilityChanged() // Always hide if (m_settings->visibility() == DockSettings::AlwaysHide) { - clearViewStruts(); + // clearViewStruts(); setGeometry(windowRect()); setVisible(false);