libinput 1.10
This commit is contained in:
		
							parent
							
								
									27ee09342e
								
							
						
					
					
						commit
						b1b6782406
					
				
							
								
								
									
										1
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							| @ -15,3 +15,4 @@ | |||||||
| /libinput-1.9.4.tar.xz | /libinput-1.9.4.tar.xz | ||||||
| /libinput-1.9.901.tar.xz | /libinput-1.9.901.tar.xz | ||||||
| /libinput-1.9.902.tar.xz | /libinput-1.9.902.tar.xz | ||||||
|  | /libinput-1.10.0.tar.xz | ||||||
|  | |||||||
| @ -1,56 +0,0 @@ | |||||||
| From d26b08b93f05eba58d46ad6811e71e9da0e74201 Mon Sep 17 00:00:00 2001 |  | ||||||
| From: Peter Hutterer <peter.hutterer@who-t.net> |  | ||||||
| Date: Mon, 5 Feb 2018 09:11:42 +1000 |  | ||||||
| Subject: [PATCH libinput] tablet: don't set rotation on a tool if we don't |  | ||||||
|  have ABS_Z |  | ||||||
| 
 |  | ||||||
| Rotation on a tool can either ABS_Z or in the case of the mouse/lens tools a |  | ||||||
| combination of ABS_TILT_X/Y. The code assumes that if the rotation on a stylus |  | ||||||
| (not mouse/lense) changes, we need to fetch it from ABS_Z. This happens on the |  | ||||||
| very first event from the tablet, proximity in invalidates all axes so we can |  | ||||||
| send the current state to the caller. |  | ||||||
| 
 |  | ||||||
| On libwacom-recognized tablets we never set the rotation bit on the stylus, so |  | ||||||
| that's all fine. On tablets without libwacom support, the stylus may have a |  | ||||||
| rotation bit copied because we have it set thanks to mouse+tilt on the tablet. |  | ||||||
| When that first event is handled, we try to access ABS_Z. On tablets without |  | ||||||
| ABS_Z like Aipteks, we go boom. |  | ||||||
| 
 |  | ||||||
| Fix this by checking for ABS_Z during tablet init, if we don't have that axis |  | ||||||
| then never set the rotation bit on the tool. That's the only axis where we |  | ||||||
| need this, all other axes have a single cause only and thus the tablet bits |  | ||||||
| are accurate anyway. |  | ||||||
| 
 |  | ||||||
| https://bugs.freedesktop.org/show_bug.cgi?id=104939 |  | ||||||
| 
 |  | ||||||
| Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> |  | ||||||
| ---
 |  | ||||||
|  src/evdev-tablet.c | 12 +++++++++++- |  | ||||||
|  1 file changed, 11 insertions(+), 1 deletion(-) |  | ||||||
| 
 |  | ||||||
| diff --git a/src/evdev-tablet.c b/src/evdev-tablet.c
 |  | ||||||
| index 2f6b64da..771e7775 100644
 |  | ||||||
| --- a/src/evdev-tablet.c
 |  | ||||||
| +++ b/src/evdev-tablet.c
 |  | ||||||
| @@ -933,7 +933,17 @@ tool_set_bits(const struct tablet_dispatch *tablet,
 |  | ||||||
|  		copy_axis_cap(tablet, tool, LIBINPUT_TABLET_TOOL_AXIS_TILT_X); |  | ||||||
|  		copy_axis_cap(tablet, tool, LIBINPUT_TABLET_TOOL_AXIS_TILT_Y); |  | ||||||
|  		copy_axis_cap(tablet, tool, LIBINPUT_TABLET_TOOL_AXIS_SLIDER); |  | ||||||
| -		copy_axis_cap(tablet, tool, LIBINPUT_TABLET_TOOL_AXIS_ROTATION_Z);
 |  | ||||||
| +
 |  | ||||||
| +		/* Rotation is special, it can be either ABS_Z or
 |  | ||||||
| +		 * BTN_TOOL_MOUSE+ABS_TILT_X/Y. Aiptek tablets have
 |  | ||||||
| +		 * mouse+tilt (and thus rotation), but they do not have
 |  | ||||||
| +		 * ABS_Z. So let's not copy the axis bit if we don't have
 |  | ||||||
| +		 * ABS_Z, otherwise we try to get the value from it later on
 |  | ||||||
| +		 * proximity in and go boom because the absinfo isn't there.
 |  | ||||||
| +		 */
 |  | ||||||
| +		if (libevdev_has_event_code(tablet->device->evdev, EV_ABS,
 |  | ||||||
| +					    ABS_Z))
 |  | ||||||
| +			copy_axis_cap(tablet, tool, LIBINPUT_TABLET_TOOL_AXIS_ROTATION_Z);
 |  | ||||||
|  		break; |  | ||||||
|  	case LIBINPUT_TABLET_TOOL_TYPE_MOUSE: |  | ||||||
|  	case LIBINPUT_TABLET_TOOL_TYPE_LENS: |  | ||||||
| -- 
 |  | ||||||
| 2.14.3 |  | ||||||
| 
 |  | ||||||
| @ -4,7 +4,7 @@ | |||||||
| %global gitversion 58abea394 | %global gitversion 58abea394 | ||||||
| 
 | 
 | ||||||
| Name:           libinput | Name:           libinput | ||||||
| Version:        1.9.902 | Version:        1.10.0 | ||||||
| Release:        1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} | Release:        1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} | ||||||
| Summary:        Input device library | Summary:        Input device library | ||||||
| 
 | 
 | ||||||
| @ -18,8 +18,6 @@ Source2:        commitid | |||||||
| Source0:        http://www.freedesktop.org/software/libinput/libinput-%{version}.tar.xz | Source0:        http://www.freedesktop.org/software/libinput/libinput-%{version}.tar.xz | ||||||
| %endif | %endif | ||||||
| 
 | 
 | ||||||
| Patch01:        0001-tablet-don-t-set-rotation-on-a-tool-if-we-don-t-have.patch |  | ||||||
| 
 |  | ||||||
| BuildRequires:  git-core | BuildRequires:  git-core | ||||||
| BuildRequires:  gcc | BuildRequires:  gcc | ||||||
| BuildRequires:  meson | BuildRequires:  meson | ||||||
| @ -111,6 +109,9 @@ The %{name}-utils package contains tools to debug hardware and analyze | |||||||
| %{_mandir}/man1/libinput-measure-trackpoint-range.1* | %{_mandir}/man1/libinput-measure-trackpoint-range.1* | ||||||
| 
 | 
 | ||||||
| %changelog | %changelog | ||||||
|  | * Tue Feb 13 2018 Peter Hutterer <peter.hutterer@redhat.com> 1.10.0-1 | ||||||
|  | - libinput 1.10 | ||||||
|  | 
 | ||||||
| * Tue Feb 06 2018 Peter Hutterer <peter.hutterer@redhat.com> 1.9.902-1 | * Tue Feb 06 2018 Peter Hutterer <peter.hutterer@redhat.com> 1.9.902-1 | ||||||
| - libinput 1.10rc2 | - libinput 1.10rc2 | ||||||
| 
 | 
 | ||||||
|  | |||||||
							
								
								
									
										2
									
								
								sources
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								sources
									
									
									
									
									
								
							| @ -1 +1 @@ | |||||||
| SHA512 (libinput-1.9.902.tar.xz) = b2309145c90b7d24bbc8894ea1fb8846d67900ce761273a6f3fa769c0e0bb0d1162363845e26ee535d5a4f438f09fa104c04c4db0ddf9efdd229fb786e32dd7e | SHA512 (libinput-1.10.0.tar.xz) = 173f72f454c534dee755b6121c4577900ae9b8a129ac41de69410c3195950a6d149d6148892c4976f013eeabca66117d53fa67e352cc005960863a5576696928 | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user