From f12744ad5f5b17fa63f11c2e1c9eb0d0b7659f1c Mon Sep 17 00:00:00 2001 From: Alejandro Mery Date: Fri, 31 Aug 2007 20:00:00 -0400 Subject: [PATCH] Fixed xf86-input-acecad to compile with input-hotplug --- xorg/xf86-input-acecad/git-fix-171d4c8d.patch | 28 ++++++++++++++++ xorg/xf86-input-acecad/git-fix-8bcc6d22.patch | 33 +++++++++++++++++++ 2 files changed, 61 insertions(+) create mode 100644 xorg/xf86-input-acecad/git-fix-171d4c8d.patch create mode 100644 xorg/xf86-input-acecad/git-fix-8bcc6d22.patch diff --git a/xorg/xf86-input-acecad/git-fix-171d4c8d.patch b/xorg/xf86-input-acecad/git-fix-171d4c8d.patch new file mode 100644 index 000000000..0f233d176 --- /dev/null +++ b/xorg/xf86-input-acecad/git-fix-171d4c8d.patch @@ -0,0 +1,28 @@ +From: Giuseppe Bilotta +Date: Mon, 9 Jul 2007 09:03:00 +0000 (+0200) +Subject: Don't crash X when the tablet wasn't found. +X-Git-Url: http://gitweb.freedesktop.org/?p=xorg/driver/xf86-input-acecad.git;a=commitdiff;h=171d4c8dc6136aa8c14aedd0ee107d6ba957de04 + +Don't crash X when the tablet wasn't found. + +X would crash when switching to console if the acecad module was loaded but the tablet had not been configured. + +Fix by properly freeing structures before returning NULL in PreInit() +--- + +--- a/src/acecad.c ++++ b/src/acecad.c +@@ -488,8 +488,12 @@ SetupProc_fail: + xf86CloseSerial (local->fd); + if ((priv) && (priv->buffer)) + XisbFree (priv->buffer); +- if (priv) ++ if (priv) { + xfree (priv); ++ if (local) ++ local->private = NULL; ++ } ++ xf86DeleteInput(local, 0); + return NULL; + } + diff --git a/xorg/xf86-input-acecad/git-fix-8bcc6d22.patch b/xorg/xf86-input-acecad/git-fix-8bcc6d22.patch new file mode 100644 index 000000000..d7edcde4c --- /dev/null +++ b/xorg/xf86-input-acecad/git-fix-8bcc6d22.patch @@ -0,0 +1,33 @@ +From: Alan Coopersmith +Date: Wed, 29 Aug 2007 00:31:54 +0000 (-0700) +Subject: Make compatible with new input ABI +X-Git-Url: http://gitweb.freedesktop.org/?p=xorg/driver/xf86-input-acecad.git;a=commitdiff;h=8bcc6d22889cc40c6b7d1582f87d4b2a816167ab + +Make compatible with new input ABI +--- + +--- a/src/acecad.c ++++ b/src/acecad.c +@@ -70,6 +70,12 @@ + #endif + #endif + ++/* Previously found in xf86Xinput.h */ ++#ifdef DBG ++#undef DBG ++#endif ++#define DBG(lvl, f) {if ((lvl) <= xf86GetVerbosity()) f;} ++ + /***************************************************************************** + * Local Headers + ****************************************************************************/ +@@ -349,7 +355,9 @@ AceCadPreInit(InputDriverPtr drv, IDevPt + local->name = dev->identifier; + local->type_name = "ACECAD Tablet"; + local->flags = XI86_POINTER_CAPABLE | XI86_SEND_DRAG_EVENTS; ++#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) == 0 + local->motion_history_proc = xf86GetMotionEvents; ++#endif + local->control_proc = NULL; + local->close_proc = CloseProc; + local->switch_mode = NULL;