forked from openkylin/qt5-ukui-platformtheme
尝试修复wayland下窗口空白区域拖拽的问题
This commit is contained in:
parent
78b91429d9
commit
07b97b87f4
|
@ -191,13 +191,13 @@ void WindowManager::mouseMoveEvent(QObject *obj, QMouseEvent *e)
|
||||||
if (!m_prepared_to_drag)
|
if (!m_prepared_to_drag)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if (m_is_dragging)
|
||||||
|
return;
|
||||||
|
|
||||||
QWidget *w = qobject_cast<QWidget*>(obj);
|
QWidget *w = qobject_cast<QWidget*>(obj);
|
||||||
const QPoint native = e->globalPos();
|
const QPoint native = e->globalPos();
|
||||||
qreal dpiRatio = qApp->devicePixelRatio();
|
qreal dpiRatio = qApp->devicePixelRatio();
|
||||||
if (QX11Info::isPlatformX11()) {
|
if (QX11Info::isPlatformX11()) {
|
||||||
if (m_is_dragging)
|
|
||||||
return;
|
|
||||||
|
|
||||||
// qDebug()<<"x11 move start";
|
// qDebug()<<"x11 move start";
|
||||||
auto connection = QX11Info::connection();
|
auto connection = QX11Info::connection();
|
||||||
xcb_ungrab_pointer(connection, XCB_TIME_CURRENT_TIME);
|
xcb_ungrab_pointer(connection, XCB_TIME_CURRENT_TIME);
|
||||||
|
@ -250,7 +250,7 @@ void WindowManager::mouseMoveEvent(QObject *obj, QMouseEvent *e)
|
||||||
return;
|
return;
|
||||||
shellSurface->requestMove(m_seat, m_serial);
|
shellSurface->requestMove(m_seat, m_serial);
|
||||||
#endif
|
#endif
|
||||||
|
m_is_dragging = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in New Issue