add NET::SkipTaskbar|NET::SkipPager propoty to block display on taskbar
添加跳过任务栏分页器属性以防止显示到任务栏视图任务 BugId:83202
This commit is contained in:
parent
1e30f5386b
commit
1ae555a179
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue