When using libinput-0.8.0, the build fails due to API incompatible changes in pointer axis handing code. Reproducible: Always Steps to Reproduce: 1. Install libinput-0.8.0 2. Try to compile KWin-5.1.95 Actual Results: Build failed with the following output: /home/armin/src/kwin-5.1.95/libinput/events.cpp: In member function ‘KWin::InputRedirection::PointerAxis KWin::LibInput::PointerEvent::axis() const’: /home/armin/src/kwin-5.1.95/libinput/events.cpp:149:59: error: ‘libinput_event_pointer_get_axis’ was not declared in this scope switch (libinput_event_pointer_get_axis(m_pointerEvent)) { ^ /home/armin/src/kwin-5.1.95/libinput/events.cpp: In member function ‘qreal KWin::LibInput::PointerEvent::axisValue() const’: /home/armin/src/kwin-5.1.95/libinput/events.cpp:161:64: error: too few arguments to function ‘double libinput_event_pointer_get_axis_value(libinput_event_pointer*, libinput_pointer_axis)’ return libinput_event_pointer_get_axis_value(m_pointerEvent); ^ In file included from /home/armin/src/kwin-5.1.95/libinput/events.h:25:0, from /home/armin/src/kwin-5.1.95/libinput/events.cpp:20: /usr/include/libinput.h:693:1: note: declared here libinput_event_pointer_get_axis_value(struct libinput_event_pointer *event, ^ Expected Results: Build completed sucessfully I have created a small patch mirroring what was done in Weston. I don't think it follows KWin's style, but at least it compiles now and could be used as reference - that's why I'm posting here instead on reviewboard (I don't know C++, sorry and it's painful to get familiar with such a large codebase such as KWin).
Created attachment 90441 [details] Fix build
thanks for the patch. That makes it easier as a starting point. Unfortunately the patch would break building with libinput < 0.8 and as we are after feature freeze that's not possible. I'll try improving the version check to set libinput to false if the version is 0.8 and integrate the patch for master.
Created attachment 90449 [details] Add a max version check Please give a try to this patch. It should disable the build of libinput support if 0.8 is found. That's probably the most suitable solution for the stable branch right now. Unfortunately my distribution doesn't provide a more recent libinput than 0.5 currently, so I could only test that it still builds. I'll try to compile libinput myself next week and get it into a state that it can build both.
Your patch allows KWin-5.2.0 to build fine when libinput-0.8.0 is present.
Git commit a93a2ab1918630c6d571b5a24379c15a0458d1fa by Martin Gräßlin. Committed on 28/01/2015 at 15:20. Pushed by graesslin into branch 'Plasma/5.2'. Disable libinput integration if >= 0.8 is found libinput 0.8 is incompatible causing the build to fail. As we are in dependency freeze the only option is to disable the build. FIXED-IN: 5.2.1 M +1 -1 CMakeLists.txt http://commits.kde.org/kwin/a93a2ab1918630c6d571b5a24379c15a0458d1fa
https://paste.kde.org/pfjdsnzsx it still fails for me with this error message. I have libinput 0.11.0 from arch linux packages.
> https://paste.kde.org/pfjdsnzsx it still fails for me with this error > message. I have libinput 0.11.0 from arch linux packages. which kwin version? This should be fixed in master and 5.2 branch.
Master
Git commit e886bd7c78b036a04ef6acba8cf641eed4a52e78 by Martin Gräßlin. Committed on 20/03/2015 at 11:42. Pushed by graesslin into branch 'master'. Adjust to newer libinput and require at least 0.10 There was API changes regarding axis event handling. M +2 -2 CMakeLists.txt M +4 -1 libinput/connection.cpp M +13 -9 libinput/events.cpp M +2 -2 libinput/events.h http://commits.kde.org/kwin/e886bd7c78b036a04ef6acba8cf641eed4a52e78