Changeset View
Changeset View
Standalone View
Standalone View
plugins/platforms/x11/standalone/edge.cpp
Show First 20 Lines • Show All 103 Lines • ▼ Show 20 Line(s) | |||||
104 | } | 104 | } | ||
105 | 105 | | |||
106 | void WindowBasedEdge::doStartApproaching() | 106 | void WindowBasedEdge::doStartApproaching() | ||
107 | { | 107 | { | ||
108 | if (!activatesForPointer()) { | 108 | if (!activatesForPointer()) { | ||
109 | return; | 109 | return; | ||
110 | } | 110 | } | ||
111 | m_approachWindow.unmap(); | 111 | m_approachWindow.unmap(); | ||
112 | Cursor *cursor = Cursor::self(); | 112 | Cursor *cursor = Cursors::self()->mouse(); | ||
113 | #ifndef KWIN_UNIT_TEST | 113 | #ifndef KWIN_UNIT_TEST | ||
114 | m_cursorPollingConnection = connect(cursor, &Cursor::posChanged, this, &WindowBasedEdge::updateApproaching); | 114 | m_cursorPollingConnection = connect(cursor, &Cursor::posChanged, this, &WindowBasedEdge::updateApproaching); | ||
115 | #endif | 115 | #endif | ||
116 | cursor->startMousePolling(); | 116 | cursor->startMousePolling(); | ||
117 | } | 117 | } | ||
118 | 118 | | |||
119 | void WindowBasedEdge::doStopApproaching() | 119 | void WindowBasedEdge::doStopApproaching() | ||
120 | { | 120 | { | ||
121 | if (!m_cursorPollingConnection) { | 121 | if (!m_cursorPollingConnection) { | ||
122 | return; | 122 | return; | ||
123 | } | 123 | } | ||
124 | disconnect(m_cursorPollingConnection); | 124 | disconnect(m_cursorPollingConnection); | ||
125 | m_cursorPollingConnection = QMetaObject::Connection(); | 125 | m_cursorPollingConnection = QMetaObject::Connection(); | ||
126 | Cursor::self()->stopMousePolling(); | 126 | Cursors::self()->mouse()->stopMousePolling(); | ||
127 | m_approachWindow.map(); | 127 | m_approachWindow.map(); | ||
128 | } | 128 | } | ||
129 | 129 | | |||
130 | void WindowBasedEdge::doUpdateBlocking() | 130 | void WindowBasedEdge::doUpdateBlocking() | ||
131 | { | 131 | { | ||
132 | if (!isReserved()) { | 132 | if (!isReserved()) { | ||
133 | return; | 133 | return; | ||
134 | } | 134 | } | ||
Show All 10 Lines |