x和wayland统一使用sdk接口设置跳过任务栏

This commit is contained in:
hewenfei 2023-05-31 17:30:01 +08:00 committed by He Sir
parent b22b504ea6
commit fb2f286d39
1 changed files with 3 additions and 6 deletions

View File

@ -102,13 +102,10 @@ void WindowHelper::setWindowAttribute(QWindow *window)
// kwin // kwin
KWindowSystem::setType(window->winId(), NET::Normal); KWindowSystem::setType(window->winId(), NET::Normal);
KWindowSystem::setState(window->winId(), NET::SkipTaskbar | NET::SkipPager | NET::SkipSwitcher); // 设置跳过多任务视图,设置跳过任务栏
if (!QX11Info::isPlatformX11()) {
// wayland环境 设置跳过多任务视图设置跳过任务栏s
kdk::WindowManager::setSkipTaskBar(window, true); kdk::WindowManager::setSkipTaskBar(window, true);
kdk::WindowManager::setSkipSwitcher(window, true); kdk::WindowManager::setSkipSwitcher(window, true);
} }
}
void WindowHelper::removeHeaderBar(QWindow *window) void WindowHelper::removeHeaderBar(QWindow *window)
{ {