diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2017-05-24 10:36:44 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2017-06-02 12:21:35 +1000 |
commit | a69294251df92e818f695cd2456c8eb860e02522 (patch) | |
tree | 817bcce975d099b4971ea9858dde868312edc99e /tools | |
parent | e9fc59efc853485cb6be0041d8d56a9c4c0642fd (diff) |
Fold the event-gui into the libinput tool
It's common enough for users to want to debug libinput behavior without
interference by the compositor or the X server. Being able to run a GUI
without having to compile from git is helpful.
Note that this changes --enable-event-gui autotools option to
--enable-debug-gui and the event-gui mesonconf option to debug-gui.
This also drops the standalone event-gui binary in both autotools and meson.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/Makefile.am | 15 | ||||
-rw-r--r-- | tools/libinput-debug-gui.1 | 32 | ||||
-rw-r--r-- | tools/libinput-debug-gui.c (renamed from tools/event-gui.c) | 2 | ||||
-rw-r--r-- | tools/libinput-tool.c | 3 | ||||
-rw-r--r-- | tools/libinput.1 | 3 |
5 files changed, 45 insertions, 10 deletions
diff --git a/tools/Makefile.am b/tools/Makefile.am index 0702dc6..85fe700 100644 --- a/tools/Makefile.am +++ b/tools/Makefile.am @@ -39,15 +39,12 @@ libinput_debug_events_LDADD = ../src/libinput.la $(LIBUDEV_LIBS) $(LIBEVDEV_LIBS libinput_debug_events_CFLAGS = $(AM_CFLAGS) $(LIBUDEV_CFLAGS) $(LIBEVDEV_CFLAGS) dist_man1_MANS += libinput-debug-events.1 -if BUILD_EVENTGUI -noinst_PROGRAMS += event-gui - -event_gui_SOURCES = event-gui.c $(shared_sources) -event_gui_LDADD = ../src/libinput.la $(CAIRO_LIBS) $(GTK_LIBS) \ - $(LIBUDEV_LIBS) $(LIBEVDEV_LIBS) -event_gui_CFLAGS = $(CAIRO_CFLAGS) $(GTK_CFLAGS) \ - $(LIBUDEV_CFLAGS) $(LIBEVDEV_CFLAGS) $(AM_CFLAGS) -event_gui_LDFLAGS = -no-install +if BUILD_DEBUG_GUI +tools_PROGRAMS += libinput-debug-gui +libinput_debug_gui_SOURCES = libinput-debug-gui.c $(shared_sources) +libinput_debug_gui_LDADD = ../src/libinput.la $(CAIRO_LIBS) $(GTK_LIBS) $(LIBEVDEV_LIBS) +libinput_debug_gui_CFLAGS = $(AM_CFLAGS) $(CAIRO_CFLAGS) $(GTK_CFLAGS) $(LIBEVDEV_CFLAGS) +dist_man1_MANS += libinput-debug-gui.1 endif EXTRA_DIST = make-ptraccel-graphs.sh $(bin_SCRIPTS) diff --git a/tools/libinput-debug-gui.1 b/tools/libinput-debug-gui.1 new file mode 100644 index 0000000..0f22a11 --- /dev/null +++ b/tools/libinput-debug-gui.1 @@ -0,0 +1,32 @@ +.TH LIBINPUT-DEBUG-GUI "1" +.SH NAME +libinput-debug-gui \- visual debug helper for libinput +.SH SYNOPSIS +.B libinput debug-gui [--help] +.SH DESCRIPTION +.PP +The +.B "libinput debug-gui" +tool creates a libinput context and a full-screen GTK window to visualize +events processed by libinput. +.PP +This is a debugging tool only, its output or behavior may change at any +time. Do not rely on the output or the behavior. +.PP +This tool usually needs to be run as root to have access to the +/dev/input/eventX nodes. +.SH OPTIONS +.TP 8 +.B --help +Print help +.PP +For all other options, see the output from --help. Options may be added or +removed at any time. +.SH NOTES +.PP +Events shown by this tool may not correspond to the events seen by a +different user of libinput. This tool initializes a separate context. +.SH LIBINPUT +Part of the +.B libinput(1) +suite diff --git a/tools/event-gui.c b/tools/libinput-debug-gui.c index 07afe0b..fa68527 100644 --- a/tools/event-gui.c +++ b/tools/libinput-debug-gui.c @@ -867,7 +867,7 @@ sockets_init(struct libinput *li) } int -main(int argc, char *argv[]) +main(int argc, char **argv) { struct window w; struct libinput *li; diff --git a/tools/libinput-tool.c b/tools/libinput-tool.c index 32bb0e5..3b7c87b 100644 --- a/tools/libinput-tool.c +++ b/tools/libinput-tool.c @@ -60,6 +60,9 @@ libinput_tool_usage(void) "\n" " debug-events\n" " Print events to stdout\n" + "\n" + " debug-gui\n" + " Display a simple GUI to visualize libinput's events.\n" "\n"); } diff --git a/tools/libinput.1 b/tools/libinput.1 index 03d85d6..654f6e0 100644 --- a/tools/libinput.1 +++ b/tools/libinput.1 @@ -39,6 +39,9 @@ information, e.g. .B libinput-debug-events(1) Print all events as seen by libinput. .TP 8 +.B libinput-debug-gui(1) +Show a GUI to visualize libinput's events. +.TP 8 .B libinput-list-devices(1) List all devices recognized by libinput. .SH LIBINPUT |