使用sdk替换KWindowSystem

This commit is contained in:
jzxc95 2023-05-19 16:06:41 +08:00
parent 61c8ac15a9
commit 74e356588c
3 changed files with 7 additions and 21 deletions

View File

@ -621,11 +621,8 @@ void VpnPage::showDetailPage(QString uuid)
void VpnPage::showUI() void VpnPage::showUI()
{ {
//2209中窗管在hide界面时会刷新属性需要重新设置无图标属性 kdk::WindowManager::setSkipTaskBar(this->windowHandle(),true);
const KWindowInfo info(this->winId(), NET::WMState); kdk::WindowManager::setSkipSwitcher(this->windowHandle(),true);
if (!info.hasState(NET::SkipTaskbar) || !info.hasState(NET::SkipPager)) {
KWindowSystem::setState(this->winId(), NET::SkipTaskbar | NET::SkipPager);
}
resetPageHeight(); resetPageHeight();

View File

@ -89,14 +89,9 @@ void MainWindow::showMainwindow()
/** /**
* *
*/ */
QString platform = QGuiApplication::platformName();
if(!platform.startsWith(QLatin1String("wayland"),Qt::CaseInsensitive)) kdk::WindowManager::setSkipTaskBar(this->windowHandle(),true);
{ kdk::WindowManager::setSkipSwitcher(this->windowHandle(),true);
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->showByWaylandHelper(); this->showByWaylandHelper();
this->raise(); this->raise();

View File

@ -649,14 +649,8 @@ void VpnPage::showDetailPage(QString devName, QString uuid)
void VpnPage::showUI() void VpnPage::showUI()
{ {
//2209中窗管在hide界面时会刷新属性需要重新设置无图标属性 kdk::WindowManager::setSkipTaskBar(this->windowHandle() ,true);
QString platform = QGuiApplication::platformName(); kdk::WindowManager::setSkipSwitcher(this->windowHandle() ,true);
if(!platform.startsWith(QLatin1String("wayland"),Qt::CaseInsensitive)) {
const KWindowInfo info(this->winId(), NET::WMState);
if (!info.hasState(NET::SkipTaskbar) || !info.hasState(NET::SkipPager)) {
KWindowSystem::setState(this->winId(), NET::SkipTaskbar | NET::SkipPager);
}
}
kdk::UkuiStyleHelper::self()->removeHeader(this); kdk::UkuiStyleHelper::self()->removeHeader(this);
resetPageHight(); resetPageHight();