From 371bd4c24fccdb293b3060d5ae98d3552380de87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Fri, 27 Feb 2015 17:57:12 +0100 Subject: [PATCH] [wayland] Use Surface::setCursor and ::hideCursor in WaylandBackend Replaces the low level wayland calls and also means that we no longer need the Wayland client library. Everything wrapped in KWayland. --- CMakeLists.txt | 1 - wayland_backend.cpp | 5 ++--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4ef0dd187d..128bd1349e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -497,7 +497,6 @@ set(kwin_XCB_LIBS ) set(kwin_WAYLAND_LIBS - Wayland::Client Wayland::Cursor XKB::XKB KF5::WaylandClient diff --git a/wayland_backend.cpp b/wayland_backend.cpp index 2a52aade16..f04d903ba0 100644 --- a/wayland_backend.cpp +++ b/wayland_backend.cpp @@ -51,7 +51,6 @@ along with this program. If not, see . #include #include // Wayland -#include #include namespace KWin @@ -115,7 +114,7 @@ WaylandSeat::WaylandSeat(wl_seat *seat, WaylandBackend *backend) m_enteredSerial = serial; if (!m_installCursor) { // explicitly hide cursor - wl_pointer_set_cursor(*m_pointer, m_enteredSerial, nullptr, 0, 0); + m_pointer->hideCursor(); } } ); @@ -201,7 +200,7 @@ void WaylandSeat::installCursorImage(wl_buffer *image, const QSize &size, const if (!m_cursor || !m_cursor->isValid()) { return; } - wl_pointer_set_cursor(*m_pointer, m_enteredSerial, *m_cursor, hotSpot.x(), hotSpot.y()); + m_pointer->setCursor(m_cursor, hotSpot); m_cursor->attachBuffer(image); m_cursor->damage(QRect(QPoint(0,0), size)); m_cursor->commit(Surface::CommitFlag::None);