From 8a9bbf7ca389d57df002e21af9ae0c4c432aa9eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Thu, 4 Jun 2015 17:50:29 +0200 Subject: [PATCH] XCB::CURSOR becomes a required dependency It was only optional because build.kde.org did not provide it when the dependency got introduced. --- CMakeLists.txt | 14 ++------------ config-kwin.h.cmake | 1 - cursor.cpp | 6 ------ kcmkwin/kwinrules/CMakeLists.txt | 5 +---- workspace.cpp | 6 ------ 5 files changed, 3 insertions(+), 29 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 291d0bc539..985ce1f198 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -196,9 +196,9 @@ find_package(XCB IMAGE SHM GLX + CURSOR OPTIONAL_COMPONENTS ICCCM - CURSOR ) set_package_properties(XCB PROPERTIES TYPE REQUIRED) @@ -207,7 +207,6 @@ if (XCB_ICCCM_VERSION VERSION_LESS "0.4") set(XCB_ICCCM_FOUND FALSE) endif() add_feature_info("XCB-ICCCM" XCB_ICCCM_FOUND "Required for building test applications for KWin") -add_feature_info("XCB-CURSOR" XCB_CURSOR_FOUND "Required for XCursor support") set(HAVE_XCB_SYNC TRUE) if (XCB_VERSION VERSION_LESS "1.10") @@ -308,12 +307,6 @@ if(NOT KWIN_HAVE_EGL) set(HAVE_GBM FALSE) endif() -if(XCB_CURSOR_FOUND) - set(HAVE_XCB_CURSOR ${XCB_CURSOR_FOUND}) -else() - set(HAVE_XCB_CURSOR FALSE) -endif() - include(CheckIncludeFiles) check_include_files(unistd.h HAVE_UNISTD_H) check_include_files(malloc.h HAVE_MALLOC_H) @@ -538,6 +531,7 @@ set(kwin_XCB_LIBS XCB::KEYSYMS XCB::SHM XCB::GLX + XCB::CURSOR ) set(kwin_WAYLAND_LIBS @@ -555,10 +549,6 @@ if(KWIN_BUILD_ACTIVITIES) set(kwin_KDE_LIBS ${kwin_KDE_LIBS} KF5::Activities) endif() -if(HAVE_XCB_CURSOR) - set(kwin_XCB_LIBS ${kwin_XCB_LIBS} XCB::CURSOR) -endif() - set(kwinLibs ${kwin_OWN_LIBS} ${kwin_QT_LIBS} diff --git a/config-kwin.h.cmake b/config-kwin.h.cmake index 0c7f43d6a8..ddf80fb454 100644 --- a/config-kwin.h.cmake +++ b/config-kwin.h.cmake @@ -12,7 +12,6 @@ #cmakedefine01 HAVE_WAYLAND_CURSOR #cmakedefine01 HAVE_XKB #cmakedefine01 HAVE_INPUT -#cmakedefine01 HAVE_XCB_CURSOR #cmakedefine01 HAVE_XCB_SYNC #cmakedefine01 HAVE_X11_XCB #cmakedefine01 HAVE_DRM diff --git a/cursor.cpp b/cursor.cpp index e97c4991b7..4678633605 100644 --- a/cursor.cpp +++ b/cursor.cpp @@ -35,9 +35,7 @@ along with this program. If not, see . #include // xcb #include -#if HAVE_XCB_CURSOR #include -#endif namespace KWin { @@ -353,7 +351,6 @@ xcb_cursor_t X11Cursor::createCursor(const QByteArray &name) if (name.isEmpty()) { return XCB_CURSOR_NONE; } -#if HAVE_XCB_CURSOR xcb_cursor_context_t *ctx; if (xcb_cursor_context_new(connection(), defaultScreen(), &ctx) < 0) { return XCB_CURSOR_NONE; @@ -460,9 +457,6 @@ xcb_cursor_t X11Cursor::createCursor(const QByteArray &name) } xcb_cursor_context_free(ctx); return cursor; -#else - return XCB_CURSOR_NONE; -#endif } QByteArray Cursor::cursorName(Qt::CursorShape shape) const diff --git a/kcmkwin/kwinrules/CMakeLists.txt b/kcmkwin/kwinrules/CMakeLists.txt index 9d004d6031..f4e22716b1 100644 --- a/kcmkwin/kwinrules/CMakeLists.txt +++ b/kcmkwin/kwinrules/CMakeLists.txt @@ -16,6 +16,7 @@ kf5_add_kdeinit_executable( kwin_rules_dialog ${kwin_rules_dialog_KDEINIT_SRCS}) set(kwin_kcm_rules_XCB_LIBS XCB::XCB XCB::XFIXES + XCB::CURSOR ) set(kcm_libs @@ -34,10 +35,6 @@ if(KWIN_BUILD_ACTIVITIES) set(kcm_libs ${kcm_libs} KF5::Activities) endif() -if(HAVE_XCB_CURSOR) - set(kwin_kcm_rules_XCB_LIBS ${kwin_kcm_rules_XCB_LIBS} XCB::CURSOR) -endif() - target_link_libraries(kdeinit_kwin_rules_dialog ${kcm_libs} ${kwin_kcm_rules_XCB_LIBS}) install(TARGETS kdeinit_kwin_rules_dialog ${INSTALL_TARGETS_DEFAULT_ARGS} ) diff --git a/workspace.cpp b/workspace.cpp index 2b1095d991..7d65ed5de6 100644 --- a/workspace.cpp +++ b/workspace.cpp @@ -1382,12 +1382,6 @@ QString Workspace::supportInformation() const support.append(yes); #else support.append(no); -#endif - support.append(QStringLiteral("HAVE_XCB_CURSOR: ")); -#if HAVE_XCB_CURSOR - support.append(yes); -#else - support.append(no); #endif support.append(QStringLiteral("HAVE_XCB_SYNC: ")); #if HAVE_XCB_SYNC