summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2017-03-21 11:17:28 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2017-03-22 10:48:43 +1000
commite3d04088bdf8b32e5b0398ee55bd782e7034bb6e (patch)
tree0011ca3de094b21e168d26884c00e8ba8137f954 /tools
parenteb8cfa301a89d15e22899fc8f320fcf5f233cf0b (diff)
tools: print axes, but not capabilities on proximity out
Print the axis values on proximity out because it a) ensures we have the right values and b) makes the output better aligned with the proximity in, so it's easier to spot in a log file. But don't print the tool capabilities because they're unrelated to the prox out anyway and again it makes the output easier to spot. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'tools')
-rw-r--r--tools/event-debug.c66
1 files changed, 34 insertions, 32 deletions
diff --git a/tools/event-debug.c b/tools/event-debug.c
index 81d7ea4..51ed428 100644
--- a/tools/event-debug.c
+++ b/tools/event-debug.c
@@ -549,8 +549,8 @@ print_proximity_event(struct libinput_event *ev)
print_tablet_axes(t);
state_str = "proximity-in";
} else if (state == LIBINPUT_TABLET_TOOL_PROXIMITY_STATE_OUT) {
+ print_tablet_axes(t);
state_str = "proximity-out";
- printq("\t");
} else {
abort();
}
@@ -561,37 +561,39 @@ print_proximity_event(struct libinput_event *ev)
libinput_tablet_tool_get_tool_id(tool),
state_str);
- printq("\taxes:");
- if (libinput_tablet_tool_has_distance(tool))
- printq("d");
- if (libinput_tablet_tool_has_pressure(tool))
- printq("p");
- if (libinput_tablet_tool_has_tilt(tool))
- printq("t");
- if (libinput_tablet_tool_has_rotation(tool))
- printq("r");
- if (libinput_tablet_tool_has_slider(tool))
- printq("s");
- if (libinput_tablet_tool_has_wheel(tool))
- printq("w");
-
- printq("\tbtn:");
- if (libinput_tablet_tool_has_button(tool, BTN_TOUCH))
- printq("T");
- if (libinput_tablet_tool_has_button(tool, BTN_STYLUS))
- printq("S");
- if (libinput_tablet_tool_has_button(tool, BTN_STYLUS2))
- printq("S2");
- if (libinput_tablet_tool_has_button(tool, BTN_LEFT))
- printq("L");
- if (libinput_tablet_tool_has_button(tool, BTN_MIDDLE))
- printq("M");
- if (libinput_tablet_tool_has_button(tool, BTN_RIGHT))
- printq("R");
- if (libinput_tablet_tool_has_button(tool, BTN_SIDE))
- printq("Sd");
- if (libinput_tablet_tool_has_button(tool, BTN_EXTRA))
- printq("Ex");
+ if (state == LIBINPUT_TABLET_TOOL_PROXIMITY_STATE_IN) {
+ printq("\taxes:");
+ if (libinput_tablet_tool_has_distance(tool))
+ printq("d");
+ if (libinput_tablet_tool_has_pressure(tool))
+ printq("p");
+ if (libinput_tablet_tool_has_tilt(tool))
+ printq("t");
+ if (libinput_tablet_tool_has_rotation(tool))
+ printq("r");
+ if (libinput_tablet_tool_has_slider(tool))
+ printq("s");
+ if (libinput_tablet_tool_has_wheel(tool))
+ printq("w");
+
+ printq("\tbtn:");
+ if (libinput_tablet_tool_has_button(tool, BTN_TOUCH))
+ printq("T");
+ if (libinput_tablet_tool_has_button(tool, BTN_STYLUS))
+ printq("S");
+ if (libinput_tablet_tool_has_button(tool, BTN_STYLUS2))
+ printq("S2");
+ if (libinput_tablet_tool_has_button(tool, BTN_LEFT))
+ printq("L");
+ if (libinput_tablet_tool_has_button(tool, BTN_MIDDLE))
+ printq("M");
+ if (libinput_tablet_tool_has_button(tool, BTN_RIGHT))
+ printq("R");
+ if (libinput_tablet_tool_has_button(tool, BTN_SIDE))
+ printq("Sd");
+ if (libinput_tablet_tool_has_button(tool, BTN_EXTRA))
+ printq("Ex");
+ }
printq("\n");
}