Compare commits

..

10 Commits

Author SHA1 Message Date
openeuler-ci-bot
b0fd15e3cf
!14 【轻量级 PR】:rebuild for next release
From: @kerongw 
Reviewed-by: @t_feng 
Signed-off-by: @t_feng
2022-10-26 11:58:12 +00:00
kerongw
2ece484946
rebuild for next release
Signed-off-by: kerongw <wangkerong@h-partners.com>
2022-10-26 03:39:26 +00:00
openeuler-ci-bot
a4a75eda7a !10 upgrade to 1.2.0
Merge pull request !10 from yangcheng1203/master
2021-12-13 07:40:44 +00:00
yangcheng1203
522395a755 Upgrade to 1.2.0 2021-12-07 10:28:42 +08:00
openeuler-ci-bot
c9a8121042 !5 xorg-x11-drv-libinput: Update to 0.30.0
Merge pull request !5 from chengguipeng_xian/master
2020-07-24 09:55:04 +08:00
chengguipeng
353b06ee66 xorg-x11-drv-libinput: Update to 0.30.0
Signed-off-by: chengguipeng <chengguipeng1@huawei.com>
2020-07-23 16:32:31 +08:00
openeuler-ci-bot
c7031c2c5c !4 add yaml file in package
Merge pull request !4 from gaoch_100/master
2020-07-21 11:22:41 +08:00
gaochao_100
a5e42004eb add yaml file in package 2020-06-16 11:14:21 +08:00
openeuler-ci-bot
0ca234d21f !3 enable make check test
Merge pull request !3 from w00284301/master
2020-02-13 11:41:10 +08:00
z00507040
7865089e99 enable check case 2020-02-12 17:55:48 +08:00
5 changed files with 129 additions and 5 deletions

View File

@ -0,0 +1,98 @@
From 41d20d35c1587f3de35acf47f926c97a30680978 Mon Sep 17 00:00:00 2001
From: Peter Hutterer <peter.hutterer@who-t.net>
Date: Thu, 18 May 2017 14:45:18 +1000
Subject: [PATCH xf86-input-libinput] Add a DPIScaleFactor option as temporary
solution to the hidpi issue
https://bugzilla.redhat.com/show_bug.cgi?id=1413306
---
man/libinput.man | 21 +++++++++++++++++++++
src/xf86libinput.c | 26 ++++++++++++++++++++++++++
2 files changed, 47 insertions(+)
diff --git a/man/libinput.man b/man/libinput.man
index 6ed4cdd..a5fa68e 100644
--- a/man/libinput.man
+++ b/man/libinput.man
@@ -426,6 +426,27 @@ This driver does not work with \fBOption \*qDevice\*q\fR set to an event
node in \fI/dev/input/by-id\fR and \fI/dev/input/by-path\fR. This can be
usually be worked by using \fBSection \*qInputClass\*q\fR with an
appropriate \fBMatch*\fR statement in the __xconfigfile__(__filemansuffix__).
+.PP
+This driver does not know about the display pixel density and submits motion
+events assuming an approximate display density of 96dpi. On high-dpi
+screens this results in a slower physical motion of the cursor (a one-pixel
+movement is a smaller physical movement on the screen). This can make
+interaction with the desktop difficult.
+.PP
+.TP 7
+.BI "Option \*qDPIScaleFactor\*q float
+This is a
+.B temporary
+solution. The factor should be set to the approximate ratio of the host display
+compared to the default 96dpi. For example, a display with 200dpi should set
+a factor of 2.0.
+.PP
+If set, x/y motion will be unconditionally multiplied by this factor,
+resulting in faster movement of the cursor. Note that this may make some
+pixels unadressable and should be used with caution.
+.PP
+.B This option is a temporary solution.
+It may be removed in any future update of this driver.
.SH AUTHORS
Peter Hutterer
diff --git a/src/xf86libinput.c b/src/xf86libinput.c
index 00f1f2c..d571288 100644
--- a/src/xf86libinput.c
+++ b/src/xf86libinput.c
@@ -193,6 +193,8 @@ struct xf86libinput {
struct scale_factor {
double x, y;
} area_scale_factor;
+
+ double dpi_scale_factor; /* Fedora hack */
};
enum event_handling {
@@ -1472,6 +1474,11 @@ xf86libinput_handle_motion(InputInfoPtr pInfo, struct libinput_event_pointer *ev
x = libinput_event_pointer_get_dx(event);
y = libinput_event_pointer_get_dy(event);
+ if (driver_data->dpi_scale_factor > 0.0) {
+ x *= driver_data->dpi_scale_factor;
+ y *= driver_data->dpi_scale_factor;
+ }
+
valuator_mask_zero(mask);
{
@@ -3698,6 +3705,25 @@ xf86libinput_pre_init(InputDriverPtr drv,
xf86libinput_parse_options(pInfo, driver_data, device);
+ /* XXX:
+ Fedora hack for bug https://bugzilla.redhat.com/show_bug.cgi?id=1413306
+ This is temporary only, but at least makes it work for now.
+ */
+
+ if (xf86CheckRealOption(pInfo->options, "DPIScaleFactor", 0.0) != 0.0) {
+ xf86IDrvMsg(pInfo, X_WARNING,
+ "\n"
+ "******************** WARNING ********************\n"
+ "* DPIScaleFactor option is a temporary solution *\n"
+ "* and may cease to work without warning! *\n"
+ "******************** WARNING ********************\n");
+ driver_data->dpi_scale_factor = xf86SetRealOption(pInfo->options, "DPIScaleFactor", 0.0);
+ if (driver_data->dpi_scale_factor < 0.0) {
+ xf86IDrvMsg(pInfo, X_ERROR, "Invalid DPIScaleFactor, ignoring value\n");
+ driver_data->dpi_scale_factor = 0.0;
+ }
+ }
+
/* Device is both keyboard and pointer. Drop the keyboard cap from
* this device, create a separate device instead */
if (!is_subdevice &&
--
2.27.0

Binary file not shown.

Binary file not shown.

View File

@ -2,16 +2,20 @@
%global driverdir %{moduledir}/input
Name: xorg-x11-drv-libinput
Version: 0.28.0
Release: 4
Version: 1.2.0
Release: 2
Summary: Xorg X11 libinput input driver
License: MIT
URL: https://www.x.org
Source0: https://www.x.org/archive/individual/driver/xf86-input-libinput-%{version}.tar.bz2
Source1: 71-libinput-overrides-wacom.conf
BuildRequires: autoconf automake libtool xorg-x11-server-devel xorg-x11-util-macros
BuildRequires: libudev-devel libevdev-devel libinput-devel
Patch0001: 0001-Add-a-DPIScaleFactor-option-as-temporary-solution-to.patch
BuildRequires: autoconf automake libtool
BuildRequires: libudev-devel libevdev-devel
BuildRequires: libinput-devel >= 0.6.0-3
BuildRequires: xorg-x11-server-devel >= 1.14.0
Requires: Xorg %(xserver-sdk-abi-requires ansic) xkeyboard-config libinput >= 0.21.0
Requires: Xorg %(xserver-sdk-abi-requires xinput)
@ -37,9 +41,12 @@ Xorg X11 libinput input driver development files.
%build
autoreconf --force -v --install || exit 1
%configure --disable-silent-rules
%configure --disable-static --disable-silent-rules
%make_build
%check
make check
%install
%make_install
@ -65,6 +72,21 @@ cp %{SOURCE1} $RPM_BUILD_ROOT%{_datadir}/X11/xorg.conf.d/
%{_mandir}/man4/libinput.4*
%changelog
* Tue Oct 25 2022 wangkerong <wangkerong@h-partners.com> - 1.2.0-2
- rebuild for next release
* Thu Nov 11 2021 yangcheng<yangcheng87@huawei.com> - 1.2.0-1
- Upgrade to 1.2.0-1
* Mon Jul 20 2020 chengguipeng<chengguipeng1@huawei.com> - 0.30.0-1
- Upgrade to 0.30.0-1
* Wed Feb 12 2020 openEuler Buildteam <buildteam@openeuler.org> - 0.28.0-5
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:enable make check test case
* Thu Jan 3 2020 openEuler Buildteam <buildteam@openeuler.org> - 0.28.0-4
- Type:bugfix
- ID:NA

View File

@ -0,0 +1,4 @@
version_control: github
src_repo: eurolinux-enterprise-linux-sources/xorg-x11-drv-libinput
tag_prefix:
seperator: .