From b6844ca214d4f7326a57efc6ed85ac61431059d3 Mon Sep 17 00:00:00 2001 From: nick black Date: Sun, 29 Aug 2021 18:03:44 -0400 Subject: [PATCH] notcurss-input: NCLOGLEVEL_ERROR --- src/input/input.cpp | 1 + src/lib/gpm.c | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/input/input.cpp b/src/input/input.cpp index bf4ec52be..30299ed52 100644 --- a/src/input/input.cpp +++ b/src/input/input.cpp @@ -336,6 +336,7 @@ int main(void){ return EXIT_FAILURE; } notcurses_options nopts{}; + nopts.loglevel = NCLOGLEVEL_ERROR; nopts.flags = NCOPTION_INHIBIT_SETLOCALE; NotCurses nc(nopts); nc.mouse_enable(); // might fail if no mouse is available diff --git a/src/lib/gpm.c b/src/lib/gpm.c index f2deff74a..323162e34 100644 --- a/src/lib/gpm.c +++ b/src/lib/gpm.c @@ -12,12 +12,12 @@ gpmwatcher(void* vti){ (void)ti; // FIXME Gpm_Event gev; while(true){ - if(Gpm_GetEvent(&gev)){ + if(!Gpm_GetEvent(&gev)){ logerror("error reading from gpm daemon\n"); - break; + continue; } loginfo("got gpm event\n"); - // FIXME + // FIXME decode event and enqueue to input layer } return NULL; }