chiark / gitweb /
xf86-input-mtrack.git
3 years agoButton zones: Export bottom_edge_zones in MTRACK_PROP_BUTTON_EMULATE_SETTINGS
Ian Jackson [Sat, 23 Apr 2016 19:26:53 +0000 (20:26 +0100)]
Button zones: Export bottom_edge_zones in MTRACK_PROP_BUTTON_EMULATE_SETTINGS

For backward compatibility this property can now be either 3 or 4
items.  When we generate it, we generate 4 items, but we accept
setting only 3 items.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agoButton zones: Provide BottomEdgeZonesEnable
Ian Jackson [Sat, 23 Apr 2016 19:18:53 +0000 (20:18 +0100)]
Button zones: Provide BottomEdgeZonesEnable

Many modern laptops have a clickpad, with some faint legend on the
surface suggesting that the bottom portion is a pair (usually) of
buttons.

Some users who are used to laptops which had separate physical buttons
below the trackpad have developed the habit of putting one finger on
the physical button, and using another finger to mouse.

This user behaviour can be supported if we:
 - ignore touches in the "button" area for all purposes, except
 - decide which button was pressed, if the user clicks the clickpad,
   by looking at which touch(es) are present in the button area

This is a novel combination of the behaviours of the BottomEdge and
ButtonZones options.  Provide a new BottomEdgeZonesEnable option,
(including documentation and static configuration).

The current code does not support users who have a habit of generating
and using chorded button events on mice with physical buttons.  (That
is, users who have configured application(s) to process simultaneous
clicks of different buttons meaningfully differently to single-button
clicks.)  I think this should be regarded as a bug in the
implementation I am introducing in this patch.  Fixing this would be
feasible without new config options or changes to other semantics but
would involve more rework of the zone processing in gestures.c than I
currently have time for.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agoButton zones: Refactor, preparatory to BottomEdgeZones
Ian Jackson [Sat, 23 Apr 2016 18:51:48 +0000 (19:51 +0100)]
Button zones: Refactor, preparatory to BottomEdgeZones

I intend to add a new feature BottomEdgeZones which reuses the Zone
machinery, but is going to use a different source for the effective X
coordinate which selects the zone.

Break out the computation of `pos'.  pos==-1 means the zone feature is
not in use or not applicable to the event.

No functional change in this commit.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agoButton zones: Remove inexplicable pad_with/2 offset
Ian Jackson [Sat, 23 Apr 2016 18:27:28 +0000 (19:27 +0100)]
Button zones: Remove inexplicable pad_with/2 offset

When button zones are in use, the code attempts to calculate which
zone the finger is in.  The left and right edges of the zones are
calculated according the nths of pad_width, where n is the number of
zones.

These left and right sides are compared with `pos', and the zone is
the one where left<=pos<=right.

This would all be correct if pos were the touch's x coordinate.
However, inexplicably, it isn't: it has had pad_width/2 added.

The git history does not reveal an explanation for adding pad_width/2.
Removing it makes the button zones work.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agoDebugging: Print each touch's state bitmask in mtstate_output
Ian Jackson [Sat, 23 Apr 2016 19:54:49 +0000 (20:54 +0100)]
Debugging: Print each touch's state bitmask in mtstate_output

The user is expected to decode the hex (with reference to the bit
numbers defined in mtstate.h).

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agocommon.h: bitmaps: Provide PRBITMASK
Ian Jackson [Sat, 23 Apr 2016 19:52:50 +0000 (20:52 +0100)]
common.h: bitmaps: Provide PRBITMASK

This is a printf format specifier, a la PRIx32 et al.  This avoids us
having to write %#x explicitly, which would be annoying if bitmask_t
ever changed its type.

No use sites introduced in this commit, so no functional change yet.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agomtrack-test.c: include <unistd.h>
Ian Jackson [Sat, 23 Apr 2016 19:31:28 +0000 (20:31 +0100)]
mtrack-test.c: include <unistd.h>

Otherwise we get an implicit declaration warning about close().

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agocommon.h: Add missing include of <mtdev-plumbing.h>
Ian Jackson [Sat, 23 Apr 2016 19:30:24 +0000 (20:30 +0100)]
common.h: Add missing include of <mtdev-plumbing.h>

Otherwise we get an implicit declaration warning about mtdev_empty.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agoAbolish uses of %+d
Ian Jackson [Sat, 23 Apr 2016 17:23:36 +0000 (18:23 +0100)]
Abolish uses of %+d

(EE) BUG: triggered 'if (f[f_idx])'
(EE) BUG: ../../os/log.c:565 in vpnprintf()
(EE) Unsupported printf directive '+'

3 years agoDEBIAN/.GITIGNORE
Ian Jackson [Sat, 23 Apr 2016 17:21:08 +0000 (18:21 +0100)]
DEBIAN/.GITIGNORE

3 years agoDH_AUTORECONF
Ian Jackson [Sat, 23 Apr 2016 20:20:56 +0000 (21:20 +0100)]
DH_AUTORECONF

3 years ago.gitignore: Add *~
Ian Jackson [Tue, 26 Apr 2016 19:40:04 +0000 (20:40 +0100)]
.gitignore: Add *~

In particular, although emacs generally doesn't generate ~ backup
files when working in a git tree, autoreconf does generate
config.h.in~, which should be ignored.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agoxf86-input-mtrack (0.3.1-1) unstable; urgency=medium
Nobuhiro Iwamatsu [Tue, 2 Jun 2015 05:04:28 +0000 (06:04 +0100)]
xf86-input-mtrack (0.3.1-1) unstable; urgency=medium

  * Upload to unstable.
  * Fix debian/copyright format.

# imported from the archive