diff options
author | Boram Park <boram1288.park@samsung.com> | 2014-04-15 16:09:19 +0900 |
---|---|---|
committer | Boram Park <boram1288.park@samsung.com> | 2014-04-15 16:09:29 +0900 |
commit | b06ff477666c0ea66b7a79d6cee41c936dfd2fad (patch) | |
tree | fd437095853630c21fe444069da96c30ac85123b | |
parent | 0dedec95d79226d495870abe66e82c32f60e0dde (diff) | |
parent | 8d4be94d93c3fe69aeb09bc0318b50c45c542dd0 (diff) | |
download | xf86-input-synaptics-b06ff477666c0ea66b7a79d6cee41c936dfd2fad.tar.gz xf86-input-synaptics-b06ff477666c0ea66b7a79d6cee41c936dfd2fad.tar.bz2 xf86-input-synaptics-b06ff477666c0ea66b7a79d6cee41c936dfd2fad.zip |
Merge branch 'upstream' into tizen
Change-Id: If1f9dea4d8eccb1a1157c70c4ac96ef4e5689d76
-rw-r--r-- | .gitignore | 78 | ||||
-rw-r--r-- | conf/50-synaptics.conf | 3 | ||||
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | src/eventcomm.c | 12 | ||||
-rw-r--r-- | src/properties.c | 10 | ||||
-rw-r--r-- | src/ps2comm.c | 8 | ||||
-rw-r--r-- | src/synaptics.c | 22 | ||||
-rw-r--r-- | src/synapticsstr.h | 4 | ||||
-rw-r--r-- | test/.gitignore | 6 | ||||
-rw-r--r-- | test/fake-symbols.c | 12 | ||||
-rw-r--r-- | test/fake-symbols.h | 2 | ||||
-rw-r--r-- | tools/.gitignore | 3 |
12 files changed, 48 insertions, 114 deletions
diff --git a/.gitignore b/.gitignore deleted file mode 100644 index c496323..0000000 --- a/.gitignore +++ /dev/null @@ -1,78 +0,0 @@ -# -# X.Org module default exclusion patterns -# The next section if for module specific patterns -# -# Do not edit the following section -# GNU Build System (Autotools) -aclocal.m4 -autom4te.cache/ -autoscan.log -ChangeLog -compile -config.guess -config.h -config.h.in -config.log -config-ml.in -config.py -config.status -config.status.lineno -config.sub -configure -configure.scan -depcomp -.deps/ -INSTALL -install-sh -.libs/ -libtool -libtool.m4 -ltmain.sh -lt~obsolete.m4 -ltoptions.m4 -ltsugar.m4 -ltversion.m4 -Makefile -Makefile.in -mdate-sh -missing -mkinstalldirs -*.pc -py-compile -stamp-h? -symlink-tree -texinfo.tex -ylwrap - -# Do not edit the following section -# Edit Compile Debug Document Distribute -*~ -*.[0-9] -*.[0-9]x -*.bak -*.bin -core -*.dll -*.exe -*-ISO*.bdf -*-JIS*.bdf -*-KOI8*.bdf -*.kld -*.ko -*.ko.cmd -*.lai -*.l[oa] -*.[oa] -*.obj -*.patch -*.so -*.pcf.gz -*.pdb -*.tar.bz2 -*.tar.gz -# -# Add & Override patterns for xf86-input-synaptics -# -# Edit the following section as needed -# For example, !report.pc overrides *.pc. See 'man gitignore' -# diff --git a/conf/50-synaptics.conf b/conf/50-synaptics.conf index 46004dc..4631719 100644 --- a/conf/50-synaptics.conf +++ b/conf/50-synaptics.conf @@ -37,6 +37,9 @@ Section "InputClass" Identifier "Default clickpad buttons" MatchDriver "synaptics" Option "SoftButtonAreas" "50% 0 82% 0 0 0 0 0" +# To disable the bottom edge area so the buttons only work as buttons, +# not for movement, set the AreaBottomEdge +# Option "AreaBottomEdge" "82%" EndSection # This option disables software buttons on Apple touchpads. diff --git a/configure.ac b/configure.ac index 894d4f5..cc9b6a8 100644 --- a/configure.ac +++ b/configure.ac @@ -23,7 +23,7 @@ # Initialize Autoconf AC_PREREQ([2.60]) AC_INIT([xf86-input-synaptics], - [1.6.2], + [1.6.4], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [xf86-input-synaptics]) AC_CONFIG_SRCDIR([Makefile.am]) diff --git a/src/eventcomm.c b/src/eventcomm.c index e1154e1..edb9f62 100644 --- a/src/eventcomm.c +++ b/src/eventcomm.c @@ -126,7 +126,7 @@ UninitializeTouch(InputInfoPtr pInfo) proto_data->last_mt_vals = NULL; } - mtdev_close(proto_data->mtdev); + mtdev_close_delete(proto_data->mtdev); proto_data->mtdev = NULL; proto_data->num_touches = 0; } @@ -518,13 +518,13 @@ SynapticsReadEvent(InputInfoPtr pInfo, struct input_event *ev) if (len <= 0) { /* We use X_NONE here because it doesn't alloc */ if (errno != EAGAIN) - xf86MsgVerb(X_NONE, 0, "%s: Read error %s\n", pInfo->name, - strerror(errno)); + LogMessageVerbSigSafe(X_ERROR, 0, "%s: Read error %d\n", pInfo->name, + errno); rc = FALSE; } else if (len % sizeof(*ev)) { - xf86MsgVerb(X_NONE, 0, "%s: Read error, invalid number of bytes.", - pInfo->name); + LogMessageVerbSigSafe(X_ERROR, 0, "%s: Read error, invalid number of bytes.", + pInfo->name); rc = FALSE; } return rc; @@ -878,7 +878,7 @@ event_query_touch(InputInfoPtr pInfo) } out: - mtdev_close(mtdev); + mtdev_close_delete(mtdev); } #endif diff --git a/src/properties.c b/src/properties.c index 3b3f1c5..83f370d 100644 --- a/src/properties.c +++ b/src/properties.c @@ -839,6 +839,16 @@ SetProperty(DeviceIntPtr dev, Atom property, XIPropertyValuePtr prop, } else if (property == prop_product_id || property == prop_device_node) return BadValue; /* read-only */ + else { /* unknown property */ + if (strcmp(SYNAPTICS_PROP_SOFTBUTTON_AREAS, NameForAtom(property)) == 0) + { + prop_softbutton_areas = property; + if (SetProperty(dev, property, prop, checkonly) != Success) + prop_softbutton_areas = 0; + else if (!checkonly) + XISetDevicePropertyDeletable(dev, property, FALSE); + } + } return Success; } diff --git a/src/ps2comm.c b/src/ps2comm.c index f88b5cb..bcbcf9b 100644 --- a/src/ps2comm.c +++ b/src/ps2comm.c @@ -483,8 +483,8 @@ ps2_synaptics_get_packet(InputInfoPtr pInfo, struct PS2SynapticsHwInfo *synhw, /* to avoid endless loops */ if (count++ > 30) { - xf86IDrvMsg(pInfo, X_ERROR, - "Synaptics driver lost sync... got gigantic packet!\n"); + LogMessageVerbSigSafe(X_ERROR, 0, + "Synaptics driver lost sync... got gigantic packet!\n"); return FALSE; } @@ -538,8 +538,8 @@ PS2ReadHwStateProto(InputInfoPtr pInfo, synhw = (struct PS2SynapticsHwInfo *) priv->proto_data; if (!synhw) { - xf86IDrvMsg(pInfo, X_ERROR, - "PS2ReadHwState, synhw is NULL. This is a bug.\n"); + LogMessageVerbSigSafe(X_ERROR, 0, + "PS2ReadHwState, synhw is NULL. This is a bug.\n"); return FALSE; } diff --git a/src/synaptics.c b/src/synaptics.c index cd9f936..e00604b 100644 --- a/src/synaptics.c +++ b/src/synaptics.c @@ -1154,6 +1154,7 @@ SynapticsReset(SynapticsPrivate * priv) priv->prev_z = 0; priv->prevFingers = 0; #ifdef HAVE_MULTITOUCH + priv->num_active_touches = 0; memset(priv->open_slots, 0, priv->num_slots * sizeof(int)); #endif } @@ -2784,10 +2785,11 @@ clickpad_guess_clickfingers(SynapticsPrivate * priv, int nfingers = 0; #if HAVE_MULTITOUCH - char close_point[SYNAPTICS_MAX_TOUCHES] = { 0 }; /* 1 for each point close - to another one */ + uint32_t close_point = 0; /* 1 bit for each point close to another one */ int i, j; + BUG_RETURN_VAL(hw->num_mt_mask > sizeof(close_point) * 8, 0); + for (i = 0; i < hw->num_mt_mask - 1; i++) { ValuatorMask *f1; @@ -2819,14 +2821,16 @@ clickpad_guess_clickfingers(SynapticsPrivate * priv, * size. Good luck. */ if (abs(x1 - x2) < (priv->maxx - priv->minx) * .3 && abs(y1 - y2) < (priv->maxy - priv->miny) * .3) { - close_point[j] = 1; - close_point[i] = 1; + close_point |= (1 << j); + close_point |= (1 << i); } } } - for (i = 0; i < SYNAPTICS_MAX_TOUCHES; i++) - nfingers += close_point[i]; + while (close_point > 0) { + nfingers += close_point & 0x1; + close_point >>= 1; + } #endif return nfingers; @@ -3118,6 +3122,7 @@ UpdateTouchState(InputInfoPtr pInfo, struct SynapticsHwState *hw) if (hw->slot_state[i] == SLOTSTATE_OPEN) { priv->open_slots[priv->num_active_touches] = i; priv->num_active_touches++; + BUG_WARN(priv->num_active_touches > priv->num_slots); } else if (hw->slot_state[i] == SLOTSTATE_CLOSE) { Bool found = FALSE; @@ -3305,6 +3310,9 @@ HandleState(InputInfoPtr pInfo, struct SynapticsHwState *hw, CARD32 now, inside_active_area = is_inside_active_area(priv, hw->x, hw->y); + /* these two just update hw->left, right, etc. */ + update_hw_button_state(pInfo, hw, priv->old_hw_state, now, &delay); + /* now we know that these _coordinates_ aren't in the area. invalid are: x, y, z, numFingers, fingerWidth valid are: millis, left/right/middle/up/down/etc. @@ -3316,8 +3324,6 @@ HandleState(InputInfoPtr pInfo, struct SynapticsHwState *hw, CARD32 now, * really release, the finger should remain down. */ } - /* these two just update hw->left, right, etc. */ - update_hw_button_state(pInfo, hw, priv->old_hw_state, now, &delay); if (priv->has_scrollbuttons) double_click = adjust_state_from_scrollbuttons(pInfo, hw); diff --git a/src/synapticsstr.h b/src/synapticsstr.h index dd6a09b..fbae394 100644 --- a/src/synapticsstr.h +++ b/src/synapticsstr.h @@ -25,6 +25,10 @@ #include "synproto.h" #include <xserver-properties.h> +#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 18 +#define LogMessageVerbSigSafe xf86MsgVerb +#endif + #ifdef DBG #undef DBG #endif diff --git a/test/.gitignore b/test/.gitignore deleted file mode 100644 index a59f751..0000000 --- a/test/.gitignore +++ /dev/null @@ -1,6 +0,0 @@ -# Add & Override patterns for xf86-input-synaptics -# -# Edit the following section as needed -# For example, !report.pc overrides *.pc. See 'man gitignore' - -eventcomm-test diff --git a/test/fake-symbols.c b/test/fake-symbols.c index 6f55c7b..86818f8 100644 --- a/test/fake-symbols.c +++ b/test/fake-symbols.c @@ -85,12 +85,6 @@ xf86NameCmp(const char *s1, const char *s2) return 0; } -_X_EXPORT char * -xf86CheckStrOption(OPTTYPE optlist, const char *name, char *deflt) -{ - return NULL; -} - _X_EXPORT void xf86AddEnabledDevice(InputInfoPtr pInfo) { @@ -327,6 +321,12 @@ xf86IDrvMsg(InputInfoPtr dev, MessageType type, const char *format, ...) } _X_EXPORT void +LogMessageVerbSigSafe(MessageType type, int verb, const char *format, ...) +{ + return; +} + +_X_EXPORT void xf86PostMotionEventP(DeviceIntPtr device, int is_absolute, int first_valuator, int num_valuators, #if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 12 diff --git a/test/fake-symbols.h b/test/fake-symbols.h index 70049d0..3bad122 100644 --- a/test/fake-symbols.h +++ b/test/fake-symbols.h @@ -23,7 +23,6 @@ extern OPTTYPE xf86AddNewOption(OPTTYPE head, const char *name, extern char *xf86OptionName(OPTTYPE opt); extern CONST char *xf86FindOptionValue(OPTTYPE options, const char *name); extern int xf86NameCmp(const char *s1, const char *s2); -extern char *xf86CheckStrOption(OPTTYPE optlist, const char *name, char *deflt); extern char *xf86SetStrOption(OPTTYPE optlist, const char *name, CONST char *deflt); @@ -34,7 +33,6 @@ extern CONST char *xf86FindOptionValue(OPTTYPE options, const char *name); extern char *xf86OptionName(OPTTYPE opt); extern char *xf86OptionValue(OPTTYPE opt); extern int xf86NameCmp(const char *s1, const char *s2); -extern char *xf86CheckStrOption(OPTTYPE optlist, const char *name, char *deflt); extern void xf86AddEnabledDevice(InputInfoPtr pInfo); extern void xf86RemoveEnabledDevice(InputInfoPtr pInfo); extern Atom XIGetKnownProperty(char *name); diff --git a/tools/.gitignore b/tools/.gitignore deleted file mode 100644 index f3b80fc..0000000 --- a/tools/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -# Add & Override for this directory and it's subdirectories -synclient -syndaemon |