[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

xserver-xorg-input-elographics: Changes to 'upstream-unstable'



 configure.ac        |    2 +-
 man/elographics.man |    3 ---
 src/xf86Elo.c       |   42 +++++++++++++++++++++++-------------------
 3 files changed, 24 insertions(+), 23 deletions(-)

New commits:
commit 9fc73c9d037a751dc2b98d4b07d7580db31b8e3a
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Mon Aug 20 11:11:41 2012 +1000

    elographics 1.4.1
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>

diff --git a/configure.ac b/configure.ac
index e4f7de2..71a7c45 100644
--- a/configure.ac
+++ b/configure.ac
@@ -22,7 +22,7 @@
 
 AC_PREREQ(2.57)
 AC_INIT([xf86-input-elographics],
-        1.4.0,
+        1.4.1,
         [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
         xf86-input-elographics)
 

commit 3f5e8141145b861f978bc1d250f4400915e1fba4
Author: Søren Holm <sh@mikrofyn.com>
Date:   Thu Aug 16 13:09:10 2012 +0200

    Added correct scaling of axes.
    
    Signed-off-by: Søren Holm <sh@sgh.dk>
    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>

diff --git a/src/xf86Elo.c b/src/xf86Elo.c
index ca21126..cb1699e 100644
--- a/src/xf86Elo.c
+++ b/src/xf86Elo.c
@@ -722,14 +722,14 @@ xf86EloControl(DeviceIntPtr	dev,
 	/* I will map coordinates myself */
 	InitValuatorAxisStruct(dev, 0,
 			       axis_labels[0],
-			       -1, -1,
+			       priv->min_x, priv->max_x,
 			       9500,
 			       0     /* min_res */,
 			       9500  /* max_res */,
 			       Absolute);
 	InitValuatorAxisStruct(dev, 1,
 			       axis_labels[1],
-			       -1, -1,
+			       priv->min_y, priv->max_y,
 			       10500,
 			       0     /* min_res */,
 			       10500 /* max_res */,

commit 948e472fb1eaa7ed0d733f93d9616ec5b199cd93
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Thu Aug 16 10:23:15 2012 +1000

    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/xf86Elo.c b/src/xf86Elo.c
index d42ebec..ca21126 100644
--- a/src/xf86Elo.c
+++ b/src/xf86Elo.c
@@ -886,7 +886,6 @@ xf86EloAllocate(InputDriverPtr drv, InputInfoPtr pInfo)
   priv->packet_buf_p = 0;
   priv->swap_axes = 0;
 
-  pInfo->flags = 0 /* XI86_NO_OPEN_ON_INIT */;
   pInfo->device_control = xf86EloControl;
   pInfo->read_input   = xf86EloReadInput;
   pInfo->control_proc = NULL;

commit c65d8e4c3307add220af82b8db3c75629f96067d
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Mon Jul 30 14:03:43 2012 +1000

    elographics 1.4.0
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>

diff --git a/configure.ac b/configure.ac
index a91be89..e4f7de2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -22,7 +22,7 @@
 
 AC_PREREQ(2.57)
 AC_INIT([xf86-input-elographics],
-        1.3.0,
+        1.4.0,
         [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
         xf86-input-elographics)
 

commit ad74c47b0adaacc88449a123f353a0f4e182b2f9
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Mon Jul 30 13:47:34 2012 +1000

    Constify a few strings
    
    xf86Elo.c:74:5: warning: initialization discards 'const' qualifier from
    pointer target type [enabled by default]
    
    several of:
    xf86Elo.c:915:3: warning: initialization discards 'const' qualifier from
    pointer target type [enabled by default]
    (input ABI 18 only)
    
    xf86Elo.c:1012:9: warning: assignment discards 'const' qualifier from
    pointer target type [enabled by default]
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>

diff --git a/src/xf86Elo.c b/src/xf86Elo.c
index 7f8865c..d42ebec 100644
--- a/src/xf86Elo.c
+++ b/src/xf86Elo.c
@@ -66,7 +66,7 @@
 
 typedef struct {
     int         type;
-    char        *name;
+    const char  *name;
 } Model;
 
 static Model SupportedModels[] =
@@ -911,7 +911,11 @@ xf86EloUninit(InputDriverPtr	drv,
   xf86DeleteInput(pInfo, 0);
 }
 
-static char *default_options[] = {
+static
+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 18
+const
+#endif
+char *default_options[] = {
   "BaudRate", "9600",
   "StopBits", "1",
   "DataBits", "8",
@@ -926,7 +930,7 @@ xf86EloInit(InputDriverPtr	drv,
 	    int			flags)
 {
   EloPrivatePtr		priv=NULL;
-  char			*str;
+  const char		*str;
   int			portrait = 0;
   int			height, width;
   char			*opt_model;

commit 461d74ba17339ea228e8d8b40efd996e3e4757a4
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Mon Jul 30 13:43:39 2012 +1000

    Swap calls to Error() to ErrorF
    
    Error doesn't exist anymore, removed in xorg-server-1.11.0-182-g09dbfcb
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>

diff --git a/src/xf86Elo.c b/src/xf86Elo.c
index 2b09bdc..7f8865c 100644
--- a/src/xf86Elo.c
+++ b/src/xf86Elo.c
@@ -248,7 +248,7 @@ xf86EloGetPacket(unsigned char	*buffer,
    * Okay, give up.
    */
   if (num_bytes < 0) {
-    Error("System error while reading from Elographics touchscreen.");
+    ErrorF("System error while reading from Elographics touchscreen.");
     return !Success;
   }
   DBG(4, ErrorF("Read %d bytes\n", num_bytes));
@@ -758,7 +758,7 @@ xf86EloControl(DeviceIntPtr	dev,
       DBG(2, ErrorF("Elographics touchscreen opening : %s\n", priv->input_dev));
       pInfo->fd = xf86OpenSerial(pInfo->options);
       if (pInfo->fd < 0) {
-	Error("Unable to open Elographics touchscreen device");
+	ErrorF("Unable to open Elographics touchscreen device");
 	return !Success;
       }
 

commit 1bdc3c58e7ad8da51f0aed6711a096bac48b168b
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Tue Jul 19 10:54:59 2011 +1000

    Test the device in PreInit and fail if it cannot be opened.
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>

diff --git a/src/xf86Elo.c b/src/xf86Elo.c
index 4e9296e..2b09bdc 100644
--- a/src/xf86Elo.c
+++ b/src/xf86Elo.c
@@ -945,7 +945,16 @@ xf86EloInit(InputDriverPtr	drv,
     xf86Msg(X_ERROR, "%s: No Device specified in Elographics module config.\n",
 	    pInfo->name);
     return BadValue;
+  } else {
+      pInfo->fd = xf86OpenSerial(pInfo->options);
+      if (pInfo->fd < 0) {
+	xf86Msg(X_ERROR, "%s: Unable to open Elographics touchscreen device %s", pInfo->name, str);
+	return BadValue;
+      }
+      xf86CloseSerial(pInfo->fd);
+      pInfo->fd = -1;
   }
+
   priv->input_dev = strdup(str);
 
   opt_model = xf86SetStrOption(pInfo->options, "Model", NULL);

commit de753ac30874f1c66bdf66d964959cd47c6b81f9
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Tue Jul 19 10:47:45 2011 +1000

    Don't free on init failure, let UnInit take care of it.
    
    Avoid double-frees when the server calls Uninit.
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>

diff --git a/src/xf86Elo.c b/src/xf86Elo.c
index cee7557..4e9296e 100644
--- a/src/xf86Elo.c
+++ b/src/xf86Elo.c
@@ -944,12 +944,6 @@ xf86EloInit(InputDriverPtr	drv,
   if (!str) {
     xf86Msg(X_ERROR, "%s: No Device specified in Elographics module config.\n",
 	    pInfo->name);
-    if (priv) {
-      if (priv->input_dev) {
-	free(priv->input_dev);
-      }
-      free(priv);
-    }
     return BadValue;
   }
   priv->input_dev = strdup(str);

commit d743407c0e95194b5745a866b296de862a96515e
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Tue Jul 19 10:41:16 2011 +1000

    Use xf86SetStrOption for Option Device
    
    Let the device be printed in the logs
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>

diff --git a/src/xf86Elo.c b/src/xf86Elo.c
index b63d351..cee7557 100644
--- a/src/xf86Elo.c
+++ b/src/xf86Elo.c
@@ -940,7 +940,7 @@ xf86EloInit(InputDriverPtr	drv,
 
   priv = pInfo->private;
 
-  str = xf86FindOptionValue(pInfo->options, "Device");
+  str = xf86SetStrOption(pInfo->options, "Device", NULL);
   if (!str) {
     xf86Msg(X_ERROR, "%s: No Device specified in Elographics module config.\n",
 	    pInfo->name);

commit 38bcc4322a378affb5ca142ff39df81908e990eb
Author: Terry Lambert <tlambert@chromium.org>
Date:   Fri Jul 15 17:23:20 2011 -0700

    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/xf86Elo.c b/src/xf86Elo.c
index e779642..b63d351 100644
--- a/src/xf86Elo.c
+++ b/src/xf86Elo.c
@@ -850,7 +850,7 @@ xf86EloControl(DeviceIntPtr	dev,
 
   default:
       ErrorF("unsupported mode=%d\n", mode);
-      return !Success;
+      return BadValue;
   }
 }
 

commit 55f337f61fdcb2d7ec77ec42d1b8b700d467196e
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Fri Jul 8 14:07:34 2011 +1000

    Fix name and type_name for elographics
    
    Don't overwrite the user-assigned name and use XI_TOUCHSCREEN for type_name.
    Don't allow Option "DeviceName", use Identifier instead.
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>

diff --git a/man/elographics.man b/man/elographics.man
index 7ce590a..32efda4 100644
--- a/man/elographics.man
+++ b/man/elographics.man
@@ -38,9 +38,6 @@ The following driver options are supported:
 The device that is attached to the touchscreen interface. Default is
 "/dev/ttyS1".
 .TP
-.BI "Option \*qDeviceName\*q \*q" string \*q
-Set the X11 device name for the touchscreen. Default is "TOUCHSCREEN".
-.TP
 .BI "Option \*qMinX\*q \*q" integer \*q
 Set the minimum value for the touchscreen X axis. Default is 600.
 .TP
diff --git a/src/xf86Elo.c b/src/xf86Elo.c
index 5aba02f..e779642 100644
--- a/src/xf86Elo.c
+++ b/src/xf86Elo.c
@@ -892,7 +892,7 @@ xf86EloAllocate(InputDriverPtr drv, InputInfoPtr pInfo)
   pInfo->control_proc = NULL;
   pInfo->switch_mode  = NULL;
   pInfo->private      = priv;
-  pInfo->type_name    = "Elographics TouchScreen";
+  pInfo->type_name    = XI_TOUCHSCREEN;
 
   return Success;
 }
@@ -967,8 +967,6 @@ xf86EloInit(InputDriverPtr	drv,
       model++;
   }
 
-  pInfo->name = xf86SetStrOption(pInfo->options, "DeviceName", XI_TOUCHSCREEN);
-  xf86Msg(X_CONFIG, "Elographics X device name: %s\n", pInfo->name);
   priv->screen_no = xf86SetIntOption(pInfo->options, "ScreenNo", 0);
   xf86Msg(X_CONFIG, "Elographics associated screen: %d\n", priv->screen_no);
   priv->untouch_delay = xf86SetIntOption(pInfo->options, "UntouchDelay", ELO_UNTOUCH_DELAY);


Reply to: