add NET::SkipTaskbar|NET::SkipPager propoty to block display on taskbar

添加跳过任务栏分页器属性以防止显示到任务栏视图任务
BugId:83202
This commit is contained in:
zhaikangning 2021-10-18 11:47:55 +08:00
parent 1e30f5386b
commit 1ae555a179
1 changed files with 12 additions and 0 deletions

View File

@ -15,6 +15,9 @@
#define THEME_SCHAME "org.ukui.style"
#define COLOR_THEME "styleName"
#include <kwindowsystem.h>
#include <kwindowsystem_export.h>
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();