使用kysdk接口,在wayland环境设置跳过任务栏和多任务视图显示.

This commit is contained in:
iaom 2022-07-20 14:07:04 +08:00
parent a0be94c524
commit 70e69e8830
1 changed files with 8 additions and 0 deletions

View File

@ -435,6 +435,10 @@ void MainWindow::centerToScreen(QWidget* widget) {
desk_y / 3 + desk_rect.top(), desk_y / 3 + desk_rect.top(),
this->width(), this->width(),
this->height())); this->height()));
//设置跳过多任务视图
kdk::WindowManager::setSkipSwitcher(this->windowHandle(),true);
//设置跳过任务栏
kdk::WindowManager::setSkipTaskBar(this->windowHandle(),true);
// widget->move(desk_x / 2 - x / 2 + desk_rect.left(), desk_y / 3 + desk_rect.top()); // widget->move(desk_x / 2 - x / 2 + desk_rect.left(), desk_y / 3 + desk_rect.top());
} }
@ -476,6 +480,10 @@ void MainWindow::initTimer() {
m_isAskDialogVisible = true; m_isAskDialogVisible = true;
kdk::UkuiStyleHelper::self()->removeHeader(m_askDialog); kdk::UkuiStyleHelper::self()->removeHeader(m_askDialog);
m_askDialog->show(); m_askDialog->show();
//设置跳过多任务视图
kdk::WindowManager::setSkipSwitcher(m_askDialog->windowHandle(),true);
//设置跳过任务栏
kdk::WindowManager::setSkipTaskBar(m_askDialog->windowHandle(),true);
m_currentSearchAsked = true; m_currentSearchAsked = true;
} }
m_askTimer->stop(); m_askTimer->stop();