Changeset View
Changeset View
Standalone View
Standalone View
autotests/integration/pointer_input.cpp
Show All 35 Lines | |||||
36 | #include <KWayland/Client/connection_thread.h> | 36 | #include <KWayland/Client/connection_thread.h> | ||
37 | #include <KWayland/Client/compositor.h> | 37 | #include <KWayland/Client/compositor.h> | ||
38 | #include <KWayland/Client/pointer.h> | 38 | #include <KWayland/Client/pointer.h> | ||
39 | #include <KWayland/Client/seat.h> | 39 | #include <KWayland/Client/seat.h> | ||
40 | #include <KWayland/Client/server_decoration.h> | 40 | #include <KWayland/Client/server_decoration.h> | ||
41 | #include <KWayland/Client/shm_pool.h> | 41 | #include <KWayland/Client/shm_pool.h> | ||
42 | #include <KWayland/Client/surface.h> | 42 | #include <KWayland/Client/surface.h> | ||
43 | 43 | | |||
44 | #include <KWayland/Server/buffer_interface.h> | 44 | #include <KWaylandServer/buffer_interface.h> | ||
45 | #include <KWayland/Server/clientconnection.h> | 45 | #include <KWaylandServer/clientconnection.h> | ||
46 | #include <KWayland/Server/seat_interface.h> | 46 | #include <KWaylandServer/seat_interface.h> | ||
47 | 47 | | |||
48 | #include <wayland-cursor.h> | 48 | #include <wayland-cursor.h> | ||
49 | 49 | | |||
50 | #include <linux/input.h> | 50 | #include <linux/input.h> | ||
51 | 51 | | |||
52 | namespace KWin | 52 | namespace KWin | ||
53 | { | 53 | { | ||
54 | 54 | | |||
Show All 15 Lines | 57 | { | |||
70 | wl_buffer *b = wl_cursor_image_get_buffer(cursor); | 70 | wl_buffer *b = wl_cursor_image_get_buffer(cursor); | ||
71 | if (!b) { | 71 | if (!b) { | ||
72 | return PlatformCursorImage(); | 72 | return PlatformCursorImage(); | ||
73 | } | 73 | } | ||
74 | 74 | | |||
75 | waylandServer()->internalClientConection()->flush(); | 75 | waylandServer()->internalClientConection()->flush(); | ||
76 | waylandServer()->dispatch(); | 76 | waylandServer()->dispatch(); | ||
77 | 77 | | |||
78 | auto buffer = KWayland::Server::BufferInterface::get( | 78 | auto buffer = KWaylandServer::BufferInterface::get( | ||
79 | waylandServer()->internalConnection()->getResource( | 79 | waylandServer()->internalConnection()->getResource( | ||
80 | KWayland::Client::Buffer::getId(b))); | 80 | KWayland::Client::Buffer::getId(b))); | ||
81 | if (!buffer) { | 81 | if (!buffer) { | ||
82 | return PlatformCursorImage{}; | 82 | return PlatformCursorImage{}; | ||
83 | } | 83 | } | ||
84 | 84 | | |||
85 | const qreal scale = screens()->maxScale(); | 85 | const qreal scale = screens()->maxScale(); | ||
86 | QImage image = buffer->data().copy(); | 86 | QImage image = buffer->data().copy(); | ||
▲ Show 20 Lines • Show All 1546 Lines • Show Last 20 Lines |