Skip to content

Commit

Permalink
fix: incorect window movement when selecting files
Browse files Browse the repository at this point in the history
missing reset pressPoint's state.

Issue: linuxdeepin/developer-center#10165
  • Loading branch information
18202781743 committed Aug 27, 2024
1 parent 279675f commit 0cc274c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion xcb/dnotitlebarwindowhelper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -542,6 +542,7 @@ bool DNoTitlebarWindowHelper::windowEvent(QEvent *event)
if (event->type() == QEvent::MouseButtonRelease) {
self->m_windowMoving = false;
Utility::updateMousePointForWindowMove(winId, true);
g_pressPoint.remove(this);
}

if (is_mouse_move && self->m_windowMoving) {
Expand All @@ -558,7 +559,7 @@ bool DNoTitlebarWindowHelper::windowEvent(QEvent *event)
g_pressPoint[this] = dynamic_cast<QMouseEvent*>(event)->globalPos();
}

if (is_mouse_move && !event->isAccepted()) {
if (is_mouse_move && !event->isAccepted() && g_pressPoint.contains(this)) {
QMouseEvent *me = static_cast<QMouseEvent*>(event);
QRect windowRect = QRect(QPoint(0, 0), w->size());
if (!windowRect.contains(me->windowPos().toPoint())) {
Expand Down

0 comments on commit 0cc274c

Please sign in to comment.