mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-05-08 21:48:05 +02:00
tools: restore option handling for the debug gui
window_init zeroes out the struct and loses any option parsing done before. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
97c69740a2
commit
f7cfc2bbbb
1 changed files with 4 additions and 2 deletions
|
|
@ -871,6 +871,7 @@ int
|
||||||
main(int argc, char **argv)
|
main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
struct window w;
|
struct window w;
|
||||||
|
struct tools_options options;
|
||||||
struct libinput *li;
|
struct libinput *li;
|
||||||
enum tools_backend backend = BACKEND_UDEV;
|
enum tools_backend backend = BACKEND_UDEV;
|
||||||
const char *seat_or_device = "seat0";
|
const char *seat_or_device = "seat0";
|
||||||
|
|
@ -879,7 +880,7 @@ main(int argc, char **argv)
|
||||||
|
|
||||||
gtk_init(&argc, &argv);
|
gtk_init(&argc, &argv);
|
||||||
|
|
||||||
tools_init_options(&w.options);
|
tools_init_options(&options);
|
||||||
|
|
||||||
while (1) {
|
while (1) {
|
||||||
int c;
|
int c;
|
||||||
|
|
@ -927,7 +928,7 @@ main(int argc, char **argv)
|
||||||
verbose = true;
|
verbose = true;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
if (tools_parse_option(c, optarg, &w.options) != 0) {
|
if (tools_parse_option(c, optarg, &options) != 0) {
|
||||||
usage();
|
usage();
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
@ -948,6 +949,7 @@ main(int argc, char **argv)
|
||||||
libinput_set_user_data(li, &w);
|
libinput_set_user_data(li, &w);
|
||||||
|
|
||||||
window_init(&w);
|
window_init(&w);
|
||||||
|
w.options = options;
|
||||||
sockets_init(li);
|
sockets_init(li);
|
||||||
handle_event_libinput(NULL, 0, li);
|
handle_event_libinput(NULL, 0, li);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue