fix:更新ukui-quick window proxy接口

This commit is contained in:
iaom 2024-05-06 09:40:07 +08:00
parent 91ae206d37
commit 708e5bde7a
2 changed files with 4 additions and 3 deletions

View File

@ -20,7 +20,6 @@
#include "settings.h"
#include "context-menu-manager.h"
#include <window-helper.h>
#include <QGuiApplication>
#include <QQuickItem>
#include <QX11Info>
@ -240,7 +239,7 @@ void MenuWindow::init()
//setWindowState(Qt::WindowMaximized);
setFlags(flags() | Qt::Window | Qt::FramelessWindowHint);
new UkuiQuick::WindowProxy(this, UkuiQuick::WindowProxy::SkipSwitcher | UkuiQuick::WindowProxy::SkipTaskBar);
m_windowProxy = new UkuiQuick::WindowProxy(this, UkuiQuick::WindowProxy::SkipSwitcher | UkuiQuick::WindowProxy::SkipTaskBar);
KWindowSystem::setType(winId(), NET::SystemWindow);
// 访问窗口api
@ -296,7 +295,7 @@ void MenuWindow::initPanelSetting()
void MenuWindow::updateGeometry()
{
updateCurrentScreenGeometry();
UkuiQuick::WindowProxy::setWindowGeometry(this, m_fullScreenGeometry);
m_windowProxy->setGeometry(m_fullScreenGeometry);
setMinimumSize(geometry().size());
setMaximumSize(geometry().size());

View File

@ -25,6 +25,7 @@
#include <QQuickView>
#include <QQuickWindow>
#include <QGSettings>
#include <window-helper.h>
namespace UkuiMenu {
@ -135,6 +136,7 @@ private:
QRect m_normalGeometry = QRect(0,0,0,0);
QRect m_fullScreenGeometry = QRect(0,0,0,0);
QGSettings *m_setting {nullptr};
UkuiQuick::WindowProxy *m_windowProxy {nullptr};
};
} // UkuiMenu