From e88a709f03e49a73ddab394567acbad8ae66269f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Mon, 8 Aug 2016 09:18:39 +0200 Subject: [PATCH] Raise minimum libinput version to 1.2 Now provided on build.kde.org, thus let's properly depend on it and remove the ifdef. --- CMakeLists.txt | 9 +-------- autotests/libinput/device_test.cpp | 5 ----- autotests/libinput/mock_libinput.cpp | 2 -- config-kwin.h.cmake | 1 - libinput/device.cpp | 4 ---- 5 files changed, 1 insertion(+), 20 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 44faa69b90..72523181ef 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -164,7 +164,7 @@ set_package_properties(XKB PROPERTIES PURPOSE "Required for building KWin with Wayland support" ) -find_package(Libinput 0.10) +find_package(Libinput 1.2) set_package_properties(Libinput PROPERTIES TYPE OPTIONAL PURPOSE "Required for input handling on Wayland.") find_package(UDev) @@ -182,13 +182,6 @@ if (UDEV_FOUND) set(HAVE_UDEV TRUE) endif() -set(HAVE_LIBINPUT_1_2 FALSE) -if (Libinput_FOUND) - if (NOT (Libinput_VERSION VERSION_LESS "1.2")) - set(HAVE_LIBINPUT_1_2 TRUE) - endif() -endif() - find_package(Libdrm) set_package_properties(Libdrm PROPERTIES TYPE OPTIONAL PURPOSE "Required for drm output on Wayland.") set(HAVE_DRM FALSE) diff --git a/autotests/libinput/device_test.cpp b/autotests/libinput/device_test.cpp index 92dcf7989d..74a6cce89d 100644 --- a/autotests/libinput/device_test.cpp +++ b/autotests/libinput/device_test.cpp @@ -151,13 +151,8 @@ void TestLibinputDevice::testDeviceType() QCOMPARE(d.property("touch").toBool(), touch); QCOMPARE(d.isTabletPad(), false); QCOMPARE(d.property("tabletPad").toBool(), false); -#if HAVE_LIBINPUT_1_2 QCOMPARE(d.isTabletTool(), tabletTool); QCOMPARE(d.property("tabletTool").toBool(), tabletTool); -#else - QCOMPARE(d.isTabletTool(), false); - QCOMPARE(d.property("tabletTool").toBool(), false); -#endif QCOMPARE(d.device(), &device); } diff --git a/autotests/libinput/mock_libinput.cpp b/autotests/libinput/mock_libinput.cpp index 6ecb6342f9..c8c512b61e 100644 --- a/autotests/libinput/mock_libinput.cpp +++ b/autotests/libinput/mock_libinput.cpp @@ -39,10 +39,8 @@ int libinput_device_has_capability(struct libinput_device *device, enum libinput return device->touch; case LIBINPUT_DEVICE_CAP_GESTURE: return device->gestureSupported; -#if HAVE_LIBINPUT_1_2 case LIBINPUT_DEVICE_CAP_TABLET_TOOL: return device->tabletTool; -#endif default: return 0; } diff --git a/config-kwin.h.cmake b/config-kwin.h.cmake index 9beff77e59..56e5c47e63 100644 --- a/config-kwin.h.cmake +++ b/config-kwin.h.cmake @@ -10,7 +10,6 @@ #define KWIN_RULES_DIALOG_BIN "${CMAKE_INSTALL_FULL_LIBEXECDIR}/kwin_rules_dialog" #define KWIN_XCLIPBOARD_SYNC_BIN "${CMAKE_INSTALL_FULL_LIBEXECDIR}/org_kde_kwin_xclipboard_syncer" #cmakedefine01 HAVE_INPUT -#cmakedefine01 HAVE_LIBINPUT_1_2 #cmakedefine01 HAVE_X11_XCB #cmakedefine01 HAVE_X11_XINPUT #cmakedefine01 HAVE_DRM diff --git a/libinput/device.cpp b/libinput/device.cpp index 08af974524..4c3ff57b2a 100644 --- a/libinput/device.cpp +++ b/libinput/device.cpp @@ -75,11 +75,7 @@ Device::Device(libinput_device *device, QObject *parent) , m_keyboard(libinput_device_has_capability(m_device, LIBINPUT_DEVICE_CAP_KEYBOARD)) , m_pointer(libinput_device_has_capability(m_device, LIBINPUT_DEVICE_CAP_POINTER)) , m_touch(libinput_device_has_capability(m_device, LIBINPUT_DEVICE_CAP_TOUCH)) -#if HAVE_LIBINPUT_1_2 , m_tabletTool(libinput_device_has_capability(m_device, LIBINPUT_DEVICE_CAP_TABLET_TOOL)) -#else - , m_tabletTool(false) -#endif #if 0 // next libinput version , m_tabletPad(libinput_device_has_capability(m_device, LIBINPUT_DEVICE_CAP_TABLET_PAD))