使用sdk替换KWindowSystem
This commit is contained in:
parent
61c8ac15a9
commit
74e356588c
|
@ -621,11 +621,8 @@ void VpnPage::showDetailPage(QString uuid)
|
|||
|
||||
void VpnPage::showUI()
|
||||
{
|
||||
//2209中窗管在hide界面时会刷新属性,需要重新设置无图标属性
|
||||
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::WindowManager::setSkipTaskBar(this->windowHandle(),true);
|
||||
kdk::WindowManager::setSkipSwitcher(this->windowHandle(),true);
|
||||
|
||||
resetPageHeight();
|
||||
|
||||
|
|
|
@ -89,14 +89,9 @@ void MainWindow::showMainwindow()
|
|||
/**
|
||||
* 设置主界面跳过任务栏和分页器的属性,隐藏再次展示有可能辉冲刷掉该属性,需要展示时重新设置
|
||||
*/
|
||||
QString platform = QGuiApplication::platformName();
|
||||
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::WindowManager::setSkipTaskBar(this->windowHandle(),true);
|
||||
kdk::WindowManager::setSkipSwitcher(this->windowHandle(),true);
|
||||
|
||||
this->showByWaylandHelper();
|
||||
this->raise();
|
||||
|
|
|
@ -649,14 +649,8 @@ void VpnPage::showDetailPage(QString devName, QString uuid)
|
|||
|
||||
void VpnPage::showUI()
|
||||
{
|
||||
//2209中窗管在hide界面时会刷新属性,需要重新设置无图标属性
|
||||
QString platform = QGuiApplication::platformName();
|
||||
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::WindowManager::setSkipTaskBar(this->windowHandle() ,true);
|
||||
kdk::WindowManager::setSkipSwitcher(this->windowHandle() ,true);
|
||||
|
||||
kdk::UkuiStyleHelper::self()->removeHeader(this);
|
||||
resetPageHight();
|
||||
|
|
Loading…
Reference in New Issue