Author: krejzi
Date: Tue Jan 27 09:02:17 2015
New Revision: 3129

Log:
Bring forward the kwin patch.

Added:
   trunk/kwin/kwin-5.2.0-libinput_fixes-1.patch
      - copied unchanged from r3121, 
trunk/kwin/kwin-5.1.95-libinput_fixes-1.patch
Deleted:
   trunk/kwin/kwin-5.1.95-libinput_fixes-1.patch

Copied: trunk/kwin/kwin-5.2.0-libinput_fixes-1.patch (from r3121, 
trunk/kwin/kwin-5.1.95-libinput_fixes-1.patch)
==============================================================================
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ trunk/kwin/kwin-5.2.0-libinput_fixes-1.patch        Tue Jan 27 09:02:17 
2015        (r3129, copy of r3121, 
trunk/kwin/kwin-5.1.95-libinput_fixes-1.patch)
@@ -0,0 +1,48 @@
+Submitted By:            Armin K. <krejzi at email dot com>
+Date:                    2015-01-15
+Initial Package Version: 5.1.95
+Upstream Status:         Submitted
+Origin:                  Self
+Description:             Fixes building with libinput-0.8.0
+
+--- a/libinput/events.cpp      2015-01-12 16:33:15.000000000 +0100
++++ b/libinput/events.cpp      2015-01-16 02:25:49.438516796 +0100
+@@ -146,19 +146,33 @@
+ InputRedirection::PointerAxis PointerEvent::axis() const
+ {
+     Q_ASSERT(type() == LIBINPUT_EVENT_POINTER_AXIS);
+-    switch (libinput_event_pointer_get_axis(m_pointerEvent)) {
+-    case LIBINPUT_POINTER_AXIS_SCROLL_HORIZONTAL:
++    if (libinput_event_pointer_has_axis(m_pointerEvent, 
LIBINPUT_POINTER_AXIS_SCROLL_HORIZONTAL))
+         return InputRedirection::PointerAxisHorizontal;
+-    case LIBINPUT_POINTER_AXIS_SCROLL_VERTICAL:
++
++    if (libinput_event_pointer_has_axis(m_pointerEvent, 
LIBINPUT_POINTER_AXIS_SCROLL_VERTICAL))
+         return InputRedirection::PointerAxisVertical;
+-    }
++
+     abort();
+ }
+ 
+ qreal PointerEvent::axisValue() const
+ {
+     Q_ASSERT(type() == LIBINPUT_EVENT_POINTER_AXIS);
+-    return libinput_event_pointer_get_axis_value(m_pointerEvent);
++
++    enum libinput_pointer_axis axis_scroll;
++
++    if (libinput_event_pointer_has_axis(m_pointerEvent, 
LIBINPUT_POINTER_AXIS_SCROLL_HORIZONTAL))
++      axis_scroll = LIBINPUT_POINTER_AXIS_SCROLL_HORIZONTAL;
++    else if (libinput_event_pointer_has_axis(m_pointerEvent, 
LIBINPUT_POINTER_AXIS_SCROLL_VERTICAL))
++      axis_scroll = LIBINPUT_POINTER_AXIS_SCROLL_VERTICAL;
++    else
++      abort();
++
++    if (libinput_event_pointer_get_axis_source(m_pointerEvent) ==  
LIBINPUT_POINTER_AXIS_SOURCE_WHEEL)
++      return 10 * 
libinput_event_pointer_get_axis_value_discrete(m_pointerEvent, axis_scroll);
++    else
++      return libinput_event_pointer_get_axis_value(m_pointerEvent, 
axis_scroll);
++
+ }
+ 
+ }
-- 
http://lists.linuxfromscratch.org/listinfo/patches
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Reply via email to