尝试修复wayland下窗口空白区域拖拽的问题

This commit is contained in:
Yue-Lan 2023-09-05 10:52:36 +08:00
parent 78b91429d9
commit 07b97b87f4
1 changed files with 4 additions and 4 deletions

View File

@ -191,13 +191,13 @@ void WindowManager::mouseMoveEvent(QObject *obj, QMouseEvent *e)
if (!m_prepared_to_drag)
return;
if (m_is_dragging)
return;
QWidget *w = qobject_cast<QWidget*>(obj);
const QPoint native = e->globalPos();
qreal dpiRatio = qApp->devicePixelRatio();
if (QX11Info::isPlatformX11()) {
if (m_is_dragging)
return;
// qDebug()<<"x11 move start";
auto connection = QX11Info::connection();
xcb_ungrab_pointer(connection, XCB_TIME_CURRENT_TIME);
@ -250,7 +250,7 @@ void WindowManager::mouseMoveEvent(QObject *obj, QMouseEvent *e)
return;
shellSurface->requestMove(m_seat, m_serial);
#endif
m_is_dragging = true;
}
return;