From a6c6408f543626b10925f9db6471b814d634a463 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Mon, 10 Aug 2015 15:39:11 +0200 Subject: [PATCH] Drop cmakedefine HAVE_WAYLAND_CURSOR Now a required build-dep. --- CMakeLists.txt | 1 - abstract_backend.cpp | 6 ------ backends/wayland/wayland_backend.cpp | 12 ------------ config-kwin.h.cmake | 1 - workspace.cpp | 6 ------ 5 files changed, 26 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9f35e56cd5..6a3082752e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -263,7 +263,6 @@ configure_file(libkwineffects/kwinconfig.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/lib # for kwin internal things set(HAVE_WAYLAND TRUE) set(HAVE_WAYLAND_EGL ${Wayland_Egl_FOUND}) -set(HAVE_WAYLAND_CURSOR TRUE) set(HAVE_X11_XCB ${X11_XCB_FOUND}) include(CheckIncludeFiles) diff --git a/abstract_backend.cpp b/abstract_backend.cpp index 28564e3e03..d30f6f6249 100644 --- a/abstract_backend.cpp +++ b/abstract_backend.cpp @@ -32,9 +32,7 @@ along with this program. If not, see . #include #include // Wayland -#if HAVE_WAYLAND_CURSOR #include -#endif namespace KWin { @@ -91,7 +89,6 @@ void AbstractBackend::installCursorImage(Qt::CursorShape shape) void AbstractBackend::updateCursorImage(Qt::CursorShape shape) { -#if HAVE_WAYLAND_CURSOR if (!m_cursorTheme) { // check whether we can create it if (waylandServer() && waylandServer()->internalShmPool()) { @@ -112,9 +109,6 @@ void AbstractBackend::updateCursorImage(Qt::CursorShape shape) waylandServer()->internalClientConection()->flush(); waylandServer()->dispatch(); installThemeCursor(KWayland::Client::Buffer::getId(b), QPoint(cursor->hotspot_x, cursor->hotspot_y)); -#else - Q_UNUSED(shape) -#endif } void AbstractBackend::installThemeCursor(quint32 id, const QPoint &hotspot) diff --git a/backends/wayland/wayland_backend.cpp b/backends/wayland/wayland_backend.cpp index 57a805eafa..a708be4b19 100644 --- a/backends/wayland/wayland_backend.cpp +++ b/backends/wayland/wayland_backend.cpp @@ -26,9 +26,7 @@ along with this program. If not, see . #include "scene_qpainter_wayland_backend.h" #include "screens_wayland.h" #include "wayland_server.h" -#if HAVE_WAYLAND_CURSOR #include "wayland_cursor_theme.h" -#endif #if HAVE_WAYLAND_EGL #include "egl_wayland_backend.h" #endif @@ -56,9 +54,7 @@ along with this program. If not, see . #include #include // Wayland -#if HAVE_WAYLAND_CURSOR #include -#endif namespace KWin { @@ -74,9 +70,7 @@ WaylandSeat::WaylandSeat(wl_seat *seat, WaylandBackend *backend) , m_keyboard(NULL) , m_touch(nullptr) , m_cursor(NULL) -#if HAVE_WAYLAND_CURSOR , m_theme(new WaylandCursorTheme(backend->shmPool(), this)) -#endif , m_enteredSerial(0) , m_backend(backend) , m_installCursor(false) @@ -256,7 +250,6 @@ void WaylandSeat::installCursorImage(wl_buffer *image, const QSize &size, const void WaylandSeat::installCursorImage(Qt::CursorShape shape) { -#if HAVE_WAYLAND_CURSOR wl_cursor_image *image = m_theme->get(shape); if (!image) { return; @@ -264,7 +257,6 @@ void WaylandSeat::installCursorImage(Qt::CursorShape shape) installCursorImage(wl_cursor_image_get_buffer(image), QSize(image->width, image->height), QPoint(image->hotspot_x, image->hotspot_y)); -#endif } void WaylandSeat::installCursorImage(const QImage &image, const QPoint &hotSpot) @@ -281,9 +273,7 @@ void WaylandSeat::setInstallCursor(bool install) WaylandCursor::WaylandCursor(Surface *parentSurface, WaylandBackend *backend) : QObject(backend) , m_backend(backend) -#if HAVE_WAYLAND_CURSOR , m_theme(new WaylandCursorTheme(backend->shmPool(), this)) -#endif { auto surface = backend->compositor()->createSurface(this); m_subSurface = backend->subCompositor()->createSubSurface(QPointer(surface), QPointer(parentSurface), this); @@ -338,7 +328,6 @@ void WaylandCursor::setCursorImage(const QImage &image, const QPoint &hotspot) void WaylandCursor::setCursorImage(Qt::CursorShape shape) { -#if HAVE_WAYLAND_CURSOR wl_cursor_image *image = m_theme->get(shape); if (!image) { return; @@ -346,7 +335,6 @@ void WaylandCursor::setCursorImage(Qt::CursorShape shape) setCursorImage(wl_cursor_image_get_buffer(image), QSize(image->width, image->height), QPoint(image->hotspot_x, image->hotspot_y)); -#endif } WaylandBackend::WaylandBackend(QObject *parent) diff --git a/config-kwin.h.cmake b/config-kwin.h.cmake index 2a42a51e62..392c806b03 100644 --- a/config-kwin.h.cmake +++ b/config-kwin.h.cmake @@ -10,7 +10,6 @@ #define KWIN_RULES_DIALOG_BIN "${CMAKE_INSTALL_PREFIX}/${LIBEXEC_INSTALL_DIR}/kwin_rules_dialog" #cmakedefine01 HAVE_WAYLAND #cmakedefine01 HAVE_WAYLAND_EGL -#cmakedefine01 HAVE_WAYLAND_CURSOR #cmakedefine01 HAVE_INPUT #cmakedefine01 HAVE_X11_XCB #cmakedefine01 HAVE_DRM diff --git a/workspace.cpp b/workspace.cpp index 06d24cca76..a190fa80a6 100644 --- a/workspace.cpp +++ b/workspace.cpp @@ -1368,12 +1368,6 @@ QString Workspace::supportInformation() const support.append(yes); #else support.append(no); -#endif - support.append(QStringLiteral("HAVE_WAYLAND_CURSOR: ")); -#if HAVE_WAYLAND_CURSOR - support.append(yes); -#else - support.append(no); #endif support.append(QStringLiteral("HAVE_INPUT: ")); #if HAVE_INPUT