fix: 适配WindowProxy
This commit is contained in:
parent
19e4af733c
commit
b355c27af6
|
@ -239,8 +239,8 @@ void MenuWindow::init()
|
|||
|
||||
//setWindowState(Qt::WindowMaximized);
|
||||
setFlags(flags() | Qt::Window | Qt::FramelessWindowHint);
|
||||
m_windowProxy = new UkuiQuick::WindowProxy(this, UkuiQuick::WindowProxy::SkipSwitcher | UkuiQuick::WindowProxy::SkipTaskBar);
|
||||
KWindowSystem::setType(winId(), NET::SystemWindow);
|
||||
m_windowProxy = new UkuiQuick::WindowProxy(this);
|
||||
m_windowProxy->setWindowType(UkuiQuick::WindowType::SystemWindow);
|
||||
|
||||
// 访问窗口api
|
||||
rootContext()->setContextProperty("mainWindow", this);
|
||||
|
@ -295,9 +295,9 @@ void MenuWindow::initPanelSetting()
|
|||
void MenuWindow::updateGeometry()
|
||||
{
|
||||
updateCurrentScreenGeometry();
|
||||
setMinimumSize(m_fullScreenGeometry.size());
|
||||
setMaximumSize(m_fullScreenGeometry.size());
|
||||
m_windowProxy->setGeometry(m_fullScreenGeometry);
|
||||
setMinimumSize(geometry().size());
|
||||
setMaximumSize(geometry().size());
|
||||
|
||||
updateGeometryOfMask();
|
||||
WindowHelper::setRegion(this, m_maskGeometry.x(), m_maskGeometry.y(), m_maskGeometry.width(), m_maskGeometry.height(), 16);
|
||||
|
@ -354,8 +354,6 @@ void MenuWindow::focusOutEvent(QFocusEvent *event)
|
|||
bool MenuWindow::event(QEvent *event)
|
||||
{
|
||||
if (event->type() == QEvent::Show) {
|
||||
KWindowSystem::setType(winId(), NET::SystemWindow);
|
||||
updateGeometry();
|
||||
if (QX11Info::isPlatformX11()) {
|
||||
requestActivate();
|
||||
}
|
||||
|
@ -485,6 +483,7 @@ void MenuWindow::activeMenuWindow(bool active)
|
|||
}
|
||||
}
|
||||
this->setScreen(currrentScreen ? currrentScreen : QGuiApplication::primaryScreen());
|
||||
updateGeometry();
|
||||
}
|
||||
|
||||
setVisible(active);
|
||||
|
|
Loading…
Reference in New Issue