diff --git a/screenedge.cpp b/screenedge.cpp index 380ec5d8ee..a1507c3543 100644 --- a/screenedge.cpp +++ b/screenedge.cpp @@ -192,7 +192,7 @@ void ScreenEdge::unreserve(ElectricBorder border) QTimer::singleShot(0, this, SLOT(update())); } -void ScreenEdge::check(const QPoint& pos, Time now) +void ScreenEdge::check(const QPoint& pos, Time now, bool forceNoPushback) { if ((pos.x() != m_screenEdgeLeft) && (pos.x() != m_screenEdgeRight) && @@ -211,7 +211,7 @@ void ScreenEdge::check(const QPoint& pos, Time now) Time treshold_reset = 250; // Reset timeout Time treshold_trigger = options->electricBorderCooldown(); // Minimum time between triggers int distance_reset = 30; // Mouse should not move more than this many pixels - int pushback_pixels = options->electricBorderPushbackPixels(); + int pushback_pixels = forceNoPushback ? 0 : options->electricBorderPushbackPixels(); ElectricBorder border; if (pos.x() == m_screenEdgeLeft && pos.y() == m_screenEdgeTop) @@ -374,7 +374,7 @@ bool ScreenEdge::isEntered(XEvent* e) for (int i = 0; i < ELECTRIC_COUNT; ++i) if (m_screenEdgeWindows[i] != None && e->xclient.window == m_screenEdgeWindows[i]) { updateXTime(); - check(QPoint(e->xclient.data.l[2] >> 16, e->xclient.data.l[2] & 0xffff), xTime()); + check(QPoint(e->xclient.data.l[2] >> 16, e->xclient.data.l[2] & 0xffff), xTime(), true); return true; } } diff --git a/screenedge.h b/screenedge.h index aa89bf06b0..b2cda7b545 100644 --- a/screenedge.h +++ b/screenedge.h @@ -58,8 +58,9 @@ public: * if one is enabled for the current region and the timeout is satisfied * @param pos the position of the mouse pointer * @param now the time when the function is called + * @param forceNoPushBack needs to be called to workaround some DnD clients, don't use unless you want to chek on a DnD event */ - void check(const QPoint& pos, Time now); + void check(const QPoint& pos, Time now, bool forceNoPushBack = false); /** * Restore the size of the specified screen edges * @param border the screen edge to restore the size of