FreeBSD Bugzilla – Attachment 179085 Details for
Bug 216272
x11-drivers/xf86-input-fpit: update for compatibility with modern X server
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
update x11-drivers/xf86-input-fpit
x11-drivers_xf86-input-fpit.patch (text/plain), 16.31 KB, created by
Matthew Rezny
on 2017-01-19 20:28:23 UTC
(
hide
)
Description:
update x11-drivers/xf86-input-fpit
Filename:
MIME Type:
Creator:
Matthew Rezny
Created:
2017-01-19 20:28:23 UTC
Size:
16.31 KB
patch
obsolete
>Index: x11-drivers/xf86-input-fpit/Makefile >=================================================================== >--- x11-drivers/xf86-input-fpit/Makefile (revision 431798) >+++ x11-drivers/xf86-input-fpit/Makefile (working copy) >@@ -2,7 +2,7 @@ > > PORTNAME= xf86-input-fpit > PORTVERSION= 1.4.0 >-PORTREVISION= 6 >+PORTREVISION= 7 > CATEGORIES= x11-drivers > > MAINTAINER= x11@FreeBSD.org >Index: x11-drivers/xf86-input-fpit/files/patch-git_01_38fde65 >=================================================================== >--- x11-drivers/xf86-input-fpit/files/patch-git_01_38fde65 (nonexistent) >+++ x11-drivers/xf86-input-fpit/files/patch-git_01_38fde65 (working copy) >@@ -0,0 +1,59 @@ >+From 38fde65f6c919350b2bf5d2b61b6e9f783ab2cf7 Mon Sep 17 00:00:00 2001 >+From: Peter Hutterer <peter.hutterer@who-t.net> >+Date: Fri, 8 Jul 2011 14:12:53 +1000 >+Subject: Fix type name and name >+ >+Don't overwrite user-specified device name and set the right type_name. >+If you're capable of setting the option DeviceName, you might as well set >+the Identifier line. >+ >+Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> >+ >+diff --git a/man/fpit.man b/man/fpit.man >+index 097ff33..8bf31f0 100644 >+--- man/fpit.man >++++ man/fpit.man >+@@ -82,10 +82,6 @@ Manipulate the invert and swap options to match screen >+ rotations. (Will behave strangely if combined with invert or swap options.) >+ New users should consider the \fI"TrackRandR"\fP option instead. >+ .TP 4 >+-.B Option \fI"DeviceName"\fP \fI"name"\fP >+-.B Option \fI"DeviceName"\fP \fI"name"\fP >+-sets the name of the X device. >+-.TP 4 >+ .B Option \fI"AlwaysCore"\fP \fI"on"\fP >+ enables the sharing of the core pointer. When this feature is enabled, the >+ device will take control of the core pointer (and thus will emit core events) >+diff --git a/src/xf86Fpit.c b/src/xf86Fpit.c >+index fa4ace7..e7e4e1a 100644 >+--- src/xf86Fpit.c >++++ src/xf86Fpit.c >+@@ -527,7 +527,6 @@ static int xf86FpitAllocate(InputDriverPtr drv, InputInfoPtr pInfo) >+ priv->fpitOldProximity = 0; >+ priv->fpitIndex = 0; >+ priv->fpitPassive = 0; >+- pInfo->name = XI_TOUCHSCREEN; >+ pInfo->flags = 0 /* XI86_NO_OPEN_ON_INIT */ ; >+ pInfo->device_control = xf86FpitControl; >+ pInfo->read_input = xf86FpitReadInput; >+@@ -536,7 +535,7 @@ static int xf86FpitAllocate(InputDriverPtr drv, InputInfoPtr pInfo) >+ pInfo->fd = -1; >+ pInfo->dev = NULL; >+ pInfo->private = priv; >+- pInfo->type_name = "Fujitsu Stylistic"; >++ pInfo->type_name = XI_TOUCHSCREEN; >+ return Success; >+ } >+ >+@@ -577,8 +576,6 @@ static int xf86FpitInit(InputDriverPtr drv, InputInfoPtr pInfo, int flags) >+ return BadValue; >+ } >+ priv->fpitDev = strdup(str); >+- pInfo->name = xf86SetStrOption(pInfo->options, "DeviceName", XI_TOUCHSCREEN); >+- xf86Msg(X_CONFIG, "FPIT device name: %s\n", pInfo->name); >+ priv->screen_no = xf86SetIntOption(pInfo->options, "ScreenNo", 0); >+ xf86Msg(X_CONFIG, "Fpit associated screen: %d\n", priv->screen_no); >+ priv->fpitMaxX = xf86SetIntOption(pInfo->options, "MaximumXPosition", FPIT_MAX_X); >+-- >+cgit v0.10.2 >+ > >Property changes on: x11-drivers/xf86-input-fpit/files/patch-git_01_38fde65 >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property >Index: x11-drivers/xf86-input-fpit/files/patch-git_02_508d879 >=================================================================== >--- x11-drivers/xf86-input-fpit/files/patch-git_02_508d879 (nonexistent) >+++ x11-drivers/xf86-input-fpit/files/patch-git_02_508d879 (working copy) >@@ -0,0 +1,25 @@ >+From 508d8793e5998fcac42a9dfd6f02235c3d82ab11 Mon Sep 17 00:00:00 2001 >+From: Terry Lambert <tlambert@chromium.org> >+Date: Fri, 15 Jul 2011 17:23:21 -0700 >+Subject: Return proper default for unknown values in pInfo->device_control. >+ >+Signed-off-by: Terry Lambert <tlambert@chromium.org> >+Reviewed-by: Stephane Marchesin <marcheu@chromium.org> >+Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> >+ >+diff --git a/src/xf86Fpit.c b/src/xf86Fpit.c >+index e7e4e1a..78b44a2 100644 >+--- src/xf86Fpit.c >++++ src/xf86Fpit.c >+@@ -495,7 +495,7 @@ static Bool xf86FpitControl(DeviceIntPtr dev, int mode) >+ return Success; >+ default: >+ ErrorF("unsupported mode=%d\n", mode); >+- return !Success; >++ return BadValue; >+ } >+ } >+ >+-- >+cgit v0.10.2 >+ > >Property changes on: x11-drivers/xf86-input-fpit/files/patch-git_02_508d879 >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property >Index: x11-drivers/xf86-input-fpit/files/patch-git_03_4b47b4a >=================================================================== >--- x11-drivers/xf86-input-fpit/files/patch-git_03_4b47b4a (nonexistent) >+++ x11-drivers/xf86-input-fpit/files/patch-git_03_4b47b4a (working copy) >@@ -0,0 +1,29 @@ >+From 4b47b4a9cdce3bd0368aacb8164aa02e05670a88 Mon Sep 17 00:00:00 2001 >+From: Peter Hutterer <peter.hutterer@who-t.net> >+Date: Tue, 19 Jul 2011 11:42:12 +1000 >+Subject: Don't free anything on PreInit failure, let UnInit take care of it >+ >+Avoid double free's by the server when it calls UnInit. >+ >+Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> >+ >+diff --git a/src/xf86Fpit.c b/src/xf86Fpit.c >+index 78b44a2..2da34aa 100644 >+--- src/xf86Fpit.c >++++ src/xf86Fpit.c >+@@ -567,12 +567,6 @@ static int xf86FpitInit(InputDriverPtr drv, InputInfoPtr pInfo, int flags) >+ str = xf86FindOptionValue(pInfo->options, "Device"); >+ if (!str) { >+ xf86Msg(X_ERROR, "%s: No Device specified in FPIT module config.\n", pInfo->name); >+- if (priv) { >+- if (priv->fpitDev) { >+- free(priv->fpitDev); >+- } >+- free(priv); >+- } >+ return BadValue; >+ } >+ priv->fpitDev = strdup(str); >+-- >+cgit v0.10.2 >+ > >Property changes on: x11-drivers/xf86-input-fpit/files/patch-git_03_4b47b4a >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property >Index: x11-drivers/xf86-input-fpit/files/patch-git_04_dc40c58 >=================================================================== >--- x11-drivers/xf86-input-fpit/files/patch-git_04_dc40c58 (nonexistent) >+++ x11-drivers/xf86-input-fpit/files/patch-git_04_dc40c58 (working copy) >@@ -0,0 +1,29 @@ >+From dc40c58c70b785c102a27652569c3de30fc44a9b Mon Sep 17 00:00:00 2001 >+From: Peter Hutterer <peter.hutterer@who-t.net> >+Date: Tue, 19 Jul 2011 11:44:35 +1000 >+Subject: Test opening the device in PreInit, fail if necessary >+ >+Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> >+ >+diff --git a/src/xf86Fpit.c b/src/xf86Fpit.c >+index 2da34aa..8c9c830 100644 >+--- src/xf86Fpit.c >++++ src/xf86Fpit.c >+@@ -568,6 +568,14 @@ static int xf86FpitInit(InputDriverPtr drv, InputInfoPtr pInfo, int flags) >+ if (!str) { >+ xf86Msg(X_ERROR, "%s: No Device specified in FPIT module config.\n", pInfo->name); >+ return BadValue; >++ } else { >++ pInfo->fd = xf86OpenSerial(pInfo->options); >++ if (pInfo->fd < 0) { >++ xf86Msg(X_ERROR, "%s: Unable to open Fpit touchscreen device '%s'", pInfo->name, str); >++ return BadValue; >++ } >++ xf86CloseSerial(pInfo->fd); >++ pInfo->fd = -1; >+ } >+ priv->fpitDev = strdup(str); >+ priv->screen_no = xf86SetIntOption(pInfo->options, "ScreenNo", 0); >+-- >+cgit v0.10.2 >+ > >Property changes on: x11-drivers/xf86-input-fpit/files/patch-git_04_dc40c58 >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property >Index: x11-drivers/xf86-input-fpit/files/patch-git_05_7a1245d >=================================================================== >--- x11-drivers/xf86-input-fpit/files/patch-git_05_7a1245d (nonexistent) >+++ x11-drivers/xf86-input-fpit/files/patch-git_05_7a1245d (working copy) >@@ -0,0 +1,23 @@ >+From 7a1245defa41517786e9752ea4e588c4f88f7047 Mon Sep 17 00:00:00 2001 >+From: Peter Hutterer <peter.hutterer@who-t.net> >+Date: Tue, 19 Jul 2011 11:45:00 +1000 >+Subject: Use xf86SetStrOption to print Option Device to the log >+ >+Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> >+ >+diff --git a/src/xf86Fpit.c b/src/xf86Fpit.c >+index 8c9c830..9ab3bb0 100644 >+--- src/xf86Fpit.c >++++ src/xf86Fpit.c >+@@ -564,7 +564,7 @@ static int xf86FpitInit(InputDriverPtr drv, InputInfoPtr pInfo, int flags) >+ return rc; >+ >+ priv = pInfo->private; >+- str = xf86FindOptionValue(pInfo->options, "Device"); >++ str = xf86SetStrOption(pInfo->options, "Device", NULL); >+ if (!str) { >+ xf86Msg(X_ERROR, "%s: No Device specified in FPIT module config.\n", pInfo->name); >+ return BadValue; >+-- >+cgit v0.10.2 >+ > >Property changes on: x11-drivers/xf86-input-fpit/files/patch-git_05_7a1245d >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property >Index: x11-drivers/xf86-input-fpit/files/patch-git_06_270607a >=================================================================== >--- x11-drivers/xf86-input-fpit/files/patch-git_06_270607a (nonexistent) >+++ x11-drivers/xf86-input-fpit/files/patch-git_06_270607a (working copy) >@@ -0,0 +1,22 @@ >+From 270607ae055a21bdac44f905a791260c5b34089b Mon Sep 17 00:00:00 2001 >+From: Peter Hutterer <peter.hutterer@who-t.net> >+Date: Tue, 19 Jul 2011 12:32:50 +1000 >+Subject: Don't call DEVICE_OFF in UnInit, the server does it for us >+ >+Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> >+ >+diff --git a/src/xf86Fpit.c b/src/xf86Fpit.c >+index 9ab3bb0..eb85a2e 100644 >+--- src/xf86Fpit.c >++++ src/xf86Fpit.c >+@@ -542,7 +542,6 @@ static int xf86FpitAllocate(InputDriverPtr drv, InputInfoPtr pInfo) >+ static void xf86FpitUninit(InputDriverPtr drv, InputInfoPtr pInfo, int flags) >+ { >+ FpitPrivatePtr priv = (FpitPrivatePtr) pInfo->private; >+- xf86FpitControl(pInfo->dev, DEVICE_OFF); >+ free(priv->fpitDev); >+ free(priv); >+ pInfo->private = NULL; >+-- >+cgit v0.10.2 >+ > >Property changes on: x11-drivers/xf86-input-fpit/files/patch-git_06_270607a >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property >Index: x11-drivers/xf86-input-fpit/files/patch-git_07_5772c7f >=================================================================== >--- x11-drivers/xf86-input-fpit/files/patch-git_07_5772c7f (nonexistent) >+++ x11-drivers/xf86-input-fpit/files/patch-git_07_5772c7f (working copy) >@@ -0,0 +1,26 @@ >+From 5772c7f58f24e259349ad048de096802184c7aa1 Mon Sep 17 00:00:00 2001 >+From: Peter Hutterer <peter.hutterer@who-t.net> >+Date: Tue, 19 Jul 2011 15:52:11 +1000 >+Subject: Check for priv before dereferencing it. >+ >+We can hit this path when the priv alloc fails. >+ >+Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> >+ >+diff --git a/src/xf86Fpit.c b/src/xf86Fpit.c >+index eb85a2e..3c70b4a 100644 >+--- src/xf86Fpit.c >++++ src/xf86Fpit.c >+@@ -542,7 +542,8 @@ static int xf86FpitAllocate(InputDriverPtr drv, InputInfoPtr pInfo) >+ static void xf86FpitUninit(InputDriverPtr drv, InputInfoPtr pInfo, int flags) >+ { >+ FpitPrivatePtr priv = (FpitPrivatePtr) pInfo->private; >+- free(priv->fpitDev); >++ if (priv) >++ free(priv->fpitDev); >+ free(priv); >+ pInfo->private = NULL; >+ xf86DeleteInput(pInfo, 0); >+-- >+cgit v0.10.2 >+ > >Property changes on: x11-drivers/xf86-input-fpit/files/patch-git_07_5772c7f >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property >Index: x11-drivers/xf86-input-fpit/files/patch-git_09_00742d9 >=================================================================== >--- x11-drivers/xf86-input-fpit/files/patch-git_09_00742d9 (nonexistent) >+++ x11-drivers/xf86-input-fpit/files/patch-git_09_00742d9 (working copy) >@@ -0,0 +1,28 @@ >+From 00742d9a9bcd06800b2548007ea304c331875666 Mon Sep 17 00:00:00 2001 >+From: Peter Hutterer <peter.hutterer@who-t.net> >+Date: Mon, 20 Aug 2012 10:00:57 +1000 >+Subject: Don't force pInfo->flags to 0 (#40870) >+ >+The server uses the flags to decide if a device comes up as attached or >+floating slave. Overwriting the flag after the server has processed the >+CorePointer/AlwaysCore/Floating/etc options results in the device always >+coming up as floating slave. This again makes the device appear >+unresponsive. >+ >+Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> >+ >+diff --git a/src/xf86Fpit.c b/src/xf86Fpit.c >+index 3c70b4a..8852d4d 100644 >+--- src/xf86Fpit.c >++++ src/xf86Fpit.c >+@@ -527,7 +527,6 @@ static int xf86FpitAllocate(InputDriverPtr drv, InputInfoPtr pInfo) >+ priv->fpitOldProximity = 0; >+ priv->fpitIndex = 0; >+ priv->fpitPassive = 0; >+- pInfo->flags = 0 /* XI86_NO_OPEN_ON_INIT */ ; >+ pInfo->device_control = xf86FpitControl; >+ pInfo->read_input = xf86FpitReadInput; >+ pInfo->control_proc = NULL; >+-- >+cgit v0.10.2 >+ > >Property changes on: x11-drivers/xf86-input-fpit/files/patch-git_09_00742d9 >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property >Index: x11-drivers/xf86-input-fpit/files/patch-src_xf86Fpit.c >=================================================================== >--- x11-drivers/xf86-input-fpit/files/patch-src_xf86Fpit.c (nonexistent) >+++ x11-drivers/xf86-input-fpit/files/patch-src_xf86Fpit.c (working copy) >@@ -0,0 +1,52 @@ >+# Finish converting RemoveEnabledDevice to xf86RemoveEnabledDevice >+# Finish converting use of Error to ErrorF >+# Remove obsolete xf86InputSetScreen >+# Correct type of default_options >+# >+--- src/xf86Fpit.c.orig 2011-06-13 23:24:05 UTC >++++ src/xf86Fpit.c >+@@ -251,7 +251,7 @@ static void xf86FpitReadInput(InputInfoP >+ /* Read data into buffer */ >+ len = xf86ReadSerial(pInfo->fd, priv->fpitData+priv->fpitIndex, BUFFER_SIZE-priv->fpitIndex); >+ if (len <= 0) { >+- Error("error reading FPIT device"); >++ ErrorF("error reading FPIT device\n"); >+ priv->fpitIndex = 0; >+ return; >+ } >+@@ -324,7 +324,7 @@ static void xf86FpitReadInput(InputInfoP >+ device = pInfo->dev; >+ >+ xf86FpitConvert(pInfo, 0, 2, x, y, 0, 0, 0, 0, &conv_x, &conv_y); >+- xf86XInputSetScreen(pInfo, priv->screen_no, conv_x, conv_y); >++ //xf86XInputSetScreen(pInfo, priv->screen_no, conv_x, conv_y); >+ >+ /* coordinates are ready we can send events */ >+ >+@@ -459,7 +459,7 @@ static Bool xf86FpitControl(DeviceIntPtr >+ if (pInfo->fd < 0) { >+ pInfo->fd = xf86OpenSerial(pInfo->options); >+ if (pInfo->fd < 0) { >+- Error("Unable to open Fpit touchscreen device"); >++ ErrorF("Unable to open Fpit touchscreen device\n"); >+ return !Success; >+ } >+ >+@@ -488,7 +488,7 @@ static Bool xf86FpitControl(DeviceIntPtr >+ case DEVICE_CLOSE: >+ dev->public.on = FALSE; >+ if (pInfo->fd >= 0) { >+- RemoveEnabledDevice(pInfo->fd); >++ xf86RemoveEnabledDevice(pInfo); >+ } >+ xf86CloseSerial(pInfo->fd); >+ pInfo->fd = -1; >+@@ -550,7 +550,7 @@ static void xf86FpitUninit(InputDriverPt >+ xf86DeleteInput(pInfo, 0); >+ } >+ >+-static char *default_options[] = { >++static const char *default_options[] = { >+ "BaudRate", "19200", "StopBits", "0", "DataBits", "8", "Parity", "None", "Vmin", "10", "Vtime", "1", "FlowControl", "None", NULL >+ }; >+ > >Property changes on: x11-drivers/xf86-input-fpit/files/patch-src_xf86Fpit.c >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 216272
: 179085