diff --git a/src/frontend/mainwindow.cpp b/src/frontend/mainwindow.cpp index 73fcf2e4..b342aaf4 100644 --- a/src/frontend/mainwindow.cpp +++ b/src/frontend/mainwindow.cpp @@ -15,6 +15,9 @@ #define THEME_SCHAME "org.ukui.style" #define COLOR_THEME "styleName" +#include +#include + MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent) { firstlyStart(); @@ -29,6 +32,15 @@ void MainWindow::showMainwindow() m_secondaryStartTimer->stop(); secondaryStart(); } + + /** + * 设置主界面跳过任务栏和分页器的属性,隐藏再次展示有可能辉冲刷掉该属性,需要展示时重新设置 + */ + const KWindowInfo info(this->winId(), NET::WMState); + if (!info.hasState(NET::SkipTaskbar) || !info.hasState(NET::SkipPager)) { + KWindowSystem::setState(this->winId(), NET::SkipTaskbar | NET::SkipPager); + } + this->resetWindowPosition(); this->showNormal(); this->raise();