Changeset View
Changeset View
Standalone View
Standalone View
screenedge.cpp
Show All 24 Lines | |||||
25 | 25 | | |||
26 | You should have received a copy of the GNU General Public License | 26 | You should have received a copy of the GNU General Public License | ||
27 | along with this program. If not, see <http://www.gnu.org/licenses/>. | 27 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
28 | *********************************************************************/ | 28 | *********************************************************************/ | ||
29 | 29 | | |||
30 | #include "screenedge.h" | 30 | #include "screenedge.h" | ||
31 | 31 | | |||
32 | // KWin | 32 | // KWin | ||
33 | #include "atoms.h" | | |||
34 | #include "gestures.h" | 33 | #include "gestures.h" | ||
35 | #include <client.h> | 34 | #include <client.h> | ||
36 | #include "cursor.h" | 35 | #include "cursor.h" | ||
37 | #include "main.h" | 36 | #include "main.h" | ||
38 | #include "platform.h" | 37 | #include "platform.h" | ||
39 | #include "screens.h" | 38 | #include "screens.h" | ||
40 | #include "utils.h" | 39 | #include "utils.h" | ||
41 | #include <workspace.h> | 40 | #include <workspace.h> | ||
▲ Show 20 Lines • Show All 1320 Lines • ▼ Show 20 Line(s) | 1347 | for (auto it = m_edges.begin(); it != m_edges.end(); ++it) { | |||
1362 | if ((*it)->check(pos, now, forceNoPushBack)) { | 1361 | if ((*it)->check(pos, now, forceNoPushBack)) { | ||
1363 | if ((*it)->client()) { | 1362 | if ((*it)->client()) { | ||
1364 | activatedForClient = true; | 1363 | activatedForClient = true; | ||
1365 | } | 1364 | } | ||
1366 | } | 1365 | } | ||
1367 | } | 1366 | } | ||
1368 | } | 1367 | } | ||
1369 | 1368 | | |||
1370 | bool ScreenEdges::isEntered(xcb_enter_notify_event_t *event) | | |||
1371 | { | | |||
1372 | return handleEnterNotifiy(event->event, | | |||
1373 | QPoint(event->root_x, event->root_y), | | |||
1374 | QDateTime::fromMSecsSinceEpoch(event->time)); | | |||
1375 | } | | |||
1376 | | ||||
1377 | bool ScreenEdges::isEntered(xcb_client_message_event_t *event) | | |||
1378 | { | | |||
1379 | if (event->type != atoms->xdnd_position) { | | |||
1380 | return false; | | |||
1381 | } | | |||
1382 | return handleDndNotify(event->window, | | |||
1383 | QPoint(event->data.data32[2] >> 16, event->data.data32[2] & 0xffff)); | | |||
1384 | } | | |||
1385 | | ||||
1386 | bool ScreenEdges::isEntered(QMouseEvent *event) | 1369 | bool ScreenEdges::isEntered(QMouseEvent *event) | ||
1387 | { | 1370 | { | ||
1388 | if (event->type() != QEvent::MouseMove) { | 1371 | if (event->type() != QEvent::MouseMove) { | ||
1389 | return false; | 1372 | return false; | ||
1390 | } | 1373 | } | ||
1391 | bool activated = false; | 1374 | bool activated = false; | ||
1392 | bool activatedForClient = false; | 1375 | bool activatedForClient = false; | ||
1393 | for (auto it = m_edges.begin(); it != m_edges.end(); ++it) { | 1376 | for (auto it = m_edges.begin(); it != m_edges.end(); ++it) { | ||
▲ Show 20 Lines • Show All 118 Lines • Show Last 20 Lines |