Raise minimum libinput version to 1.2
Now provided on build.kde.org, thus let's properly depend on it and remove the ifdef.
This commit is contained in:
parent
8a83a6fef5
commit
e88a709f03
5 changed files with 1 additions and 20 deletions
|
@ -164,7 +164,7 @@ set_package_properties(XKB PROPERTIES
|
||||||
PURPOSE "Required for building KWin with Wayland support"
|
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.")
|
set_package_properties(Libinput PROPERTIES TYPE OPTIONAL PURPOSE "Required for input handling on Wayland.")
|
||||||
|
|
||||||
find_package(UDev)
|
find_package(UDev)
|
||||||
|
@ -182,13 +182,6 @@ if (UDEV_FOUND)
|
||||||
set(HAVE_UDEV TRUE)
|
set(HAVE_UDEV TRUE)
|
||||||
endif()
|
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)
|
find_package(Libdrm)
|
||||||
set_package_properties(Libdrm PROPERTIES TYPE OPTIONAL PURPOSE "Required for drm output on Wayland.")
|
set_package_properties(Libdrm PROPERTIES TYPE OPTIONAL PURPOSE "Required for drm output on Wayland.")
|
||||||
set(HAVE_DRM FALSE)
|
set(HAVE_DRM FALSE)
|
||||||
|
|
|
@ -151,13 +151,8 @@ void TestLibinputDevice::testDeviceType()
|
||||||
QCOMPARE(d.property("touch").toBool(), touch);
|
QCOMPARE(d.property("touch").toBool(), touch);
|
||||||
QCOMPARE(d.isTabletPad(), false);
|
QCOMPARE(d.isTabletPad(), false);
|
||||||
QCOMPARE(d.property("tabletPad").toBool(), false);
|
QCOMPARE(d.property("tabletPad").toBool(), false);
|
||||||
#if HAVE_LIBINPUT_1_2
|
|
||||||
QCOMPARE(d.isTabletTool(), tabletTool);
|
QCOMPARE(d.isTabletTool(), tabletTool);
|
||||||
QCOMPARE(d.property("tabletTool").toBool(), tabletTool);
|
QCOMPARE(d.property("tabletTool").toBool(), tabletTool);
|
||||||
#else
|
|
||||||
QCOMPARE(d.isTabletTool(), false);
|
|
||||||
QCOMPARE(d.property("tabletTool").toBool(), false);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
QCOMPARE(d.device(), &device);
|
QCOMPARE(d.device(), &device);
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,10 +39,8 @@ int libinput_device_has_capability(struct libinput_device *device, enum libinput
|
||||||
return device->touch;
|
return device->touch;
|
||||||
case LIBINPUT_DEVICE_CAP_GESTURE:
|
case LIBINPUT_DEVICE_CAP_GESTURE:
|
||||||
return device->gestureSupported;
|
return device->gestureSupported;
|
||||||
#if HAVE_LIBINPUT_1_2
|
|
||||||
case LIBINPUT_DEVICE_CAP_TABLET_TOOL:
|
case LIBINPUT_DEVICE_CAP_TABLET_TOOL:
|
||||||
return device->tabletTool;
|
return device->tabletTool;
|
||||||
#endif
|
|
||||||
default:
|
default:
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,7 +10,6 @@
|
||||||
#define KWIN_RULES_DIALOG_BIN "${CMAKE_INSTALL_FULL_LIBEXECDIR}/kwin_rules_dialog"
|
#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"
|
#define KWIN_XCLIPBOARD_SYNC_BIN "${CMAKE_INSTALL_FULL_LIBEXECDIR}/org_kde_kwin_xclipboard_syncer"
|
||||||
#cmakedefine01 HAVE_INPUT
|
#cmakedefine01 HAVE_INPUT
|
||||||
#cmakedefine01 HAVE_LIBINPUT_1_2
|
|
||||||
#cmakedefine01 HAVE_X11_XCB
|
#cmakedefine01 HAVE_X11_XCB
|
||||||
#cmakedefine01 HAVE_X11_XINPUT
|
#cmakedefine01 HAVE_X11_XINPUT
|
||||||
#cmakedefine01 HAVE_DRM
|
#cmakedefine01 HAVE_DRM
|
||||||
|
|
|
@ -75,11 +75,7 @@ Device::Device(libinput_device *device, QObject *parent)
|
||||||
, m_keyboard(libinput_device_has_capability(m_device, LIBINPUT_DEVICE_CAP_KEYBOARD))
|
, 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_pointer(libinput_device_has_capability(m_device, LIBINPUT_DEVICE_CAP_POINTER))
|
||||||
, m_touch(libinput_device_has_capability(m_device, LIBINPUT_DEVICE_CAP_TOUCH))
|
, 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))
|
, m_tabletTool(libinput_device_has_capability(m_device, LIBINPUT_DEVICE_CAP_TABLET_TOOL))
|
||||||
#else
|
|
||||||
, m_tabletTool(false)
|
|
||||||
#endif
|
|
||||||
#if 0
|
#if 0
|
||||||
// next libinput version
|
// next libinput version
|
||||||
, m_tabletPad(libinput_device_has_capability(m_device, LIBINPUT_DEVICE_CAP_TABLET_PAD))
|
, m_tabletPad(libinput_device_has_capability(m_device, LIBINPUT_DEVICE_CAP_TABLET_PAD))
|
||||||
|
|
Loading…
Reference in a new issue