Raise minimum libinput version to 1.2

Now provided on build.kde.org, thus let's properly depend on it and
remove the ifdef.
icc-effect-5.14.5
Martin Gräßlin 2016-08-08 09:18:39 +02:00
parent 8a83a6fef5
commit e88a709f03
5 changed files with 1 additions and 20 deletions

View File

@ -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)

View File

@ -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);
}

View File

@ -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;
}

View File

@ -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

View File

@ -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))