~mil/lisgd

a7063d8a523ae00a01284caf7c8ba93574b51c46 — Maarten van Gompel 3 months ago 190a93d 0.3.1
Minor fix for when ActModePressed gestures are defined in config.h (fixes #331)

Signed-off-by: Stacy Harper <contact@stacyharper.net>
2 files changed, 3 insertions(+), 1 deletions(-)

M config.def.h
M lisgd.c
M config.def.h => config.def.h +1 -0
@@ 22,6 22,7 @@ double edgesizeright = 50.0;
double edgesizebottom = 50.0;
char *device = "/dev/input/touchscreen";

//Gestures can also be specified interactively from the command line using -g
Gesture gestures[] = {
	/* nfingers  gesturetype  command */
	{ 1,         SwipeLR,     EdgeAny, DistanceAny, ActModeReleased, "xdotool key --clearmodifiers Alt+Shift+e" },

M lisgd.c => lisgd.c +2 -1
@@ 520,7 520,6 @@ main(int argc, char *argv[])
					case 4:
						if (!strcmp(gestpt, "P")) {
							gestsarr[gestsarrlen-1].actmode = ActModePressed;
							have_actmode_pressed++;
						} else {
							gestsarr[gestsarrlen-1].actmode = ActModeReleased;
							if (strcmp(gestpt, "R") != 0) {


@@ 561,6 560,8 @@ main(int argc, char *argv[])
	for (i = 0; i < gestsarrlen; i++) {
		gestsarr[i].swipe = swipereorient(gestsarr[i].swipe, orientation);
		gestsarr[i].edge = edgereorient(gestsarr[i].edge, orientation);
		//Detect whether ActMode pressed is used
		if (gestsarr[i].actmode == ActModePressed) have_actmode_pressed++;
	}

	run();