diff --git a/events.cpp b/events.cpp index 638078441a..1fa6e425d4 100644 --- a/events.cpp +++ b/events.cpp @@ -193,6 +193,8 @@ bool Workspace::workspaceEvent(xcb_generic_event_t *e) #ifdef KWIN_BUILD_SCREENEDGES if (QWidget::mouseGrabber()) { ScreenEdges::self()->check(rootPos, QDateTime::fromMSecsSinceEpoch(xTime()), true); + } else { + ScreenEdges::self()->check(rootPos, QDateTime::fromMSecsSinceEpoch(mouseEvent->time)); } #endif break; diff --git a/screenedge.cpp b/screenedge.cpp index 4279855dcb..04cf0d6d52 100644 --- a/screenedge.cpp +++ b/screenedge.cpp @@ -469,7 +469,7 @@ void WindowBasedEdge::createWindow() const uint32_t mask = XCB_CW_OVERRIDE_REDIRECT | XCB_CW_EVENT_MASK; const uint32_t values[] = { true, - XCB_EVENT_MASK_ENTER_WINDOW | XCB_EVENT_MASK_LEAVE_WINDOW + XCB_EVENT_MASK_ENTER_WINDOW | XCB_EVENT_MASK_LEAVE_WINDOW | XCB_EVENT_MASK_POINTER_MOTION }; m_window.create(geometry(), XCB_WINDOW_CLASS_INPUT_ONLY, mask, values); m_window.map(); @@ -490,7 +490,7 @@ void WindowBasedEdge::createApproachWindow() const uint32_t mask = XCB_CW_OVERRIDE_REDIRECT | XCB_CW_EVENT_MASK; const uint32_t values[] = { true, - XCB_EVENT_MASK_ENTER_WINDOW | XCB_EVENT_MASK_LEAVE_WINDOW + XCB_EVENT_MASK_ENTER_WINDOW | XCB_EVENT_MASK_LEAVE_WINDOW | XCB_EVENT_MASK_POINTER_MOTION }; m_approachWindow.create(approachGeometry(), XCB_WINDOW_CLASS_INPUT_ONLY, mask, values); m_approachWindow.map(); @@ -964,6 +964,12 @@ void ScreenEdges::unreserve(ElectricBorder border, QObject *object) void ScreenEdges::check(const QPoint &pos, const QDateTime &now, bool forceNoPushBack) { for (QList::iterator it = m_edges.begin(); it != m_edges.end(); ++it) { + if (!(*it)->isReserved()) { + continue; + } + if ((*it)->approachGeometry().contains(pos)) { + (*it)->startApproaching(); + } (*it)->check(pos, now, forceNoPushBack); } }