使用sdk替换KWindowSystem
This commit is contained in:
parent
61c8ac15a9
commit
74e356588c
|
@ -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();
|
||||||
|
|
||||||
|
|
|
@ -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();
|
||||||
|
|
|
@ -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();
|
||||||
|
|
Loading…
Reference in New Issue