aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2019-07-21 15:37:39 +0200
committerDavid Robillard <d@drobilla.net>2019-07-21 15:46:46 +0200
commit0ef7e4312136bc4f4b29ba17a9e6ea74a77418d5 (patch)
tree6df3e8ff1c50afdfdf251cde5c0d4ed48d0d4ba5
parent38b4790a89420b5b3f9c50e7025173301cd531d4 (diff)
Print more information about crossing and focus events
-rw-r--r--pugl_test.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/pugl_test.c b/pugl_test.c
index 9eacf36..3656773 100644
--- a/pugl_test.c
+++ b/pugl_test.c
@@ -220,18 +220,20 @@ onEvent(PuglView* view, const PuglEvent* event)
puglPostRedisplay(view);
break;
case PUGL_ENTER_NOTIFY:
- fprintf(stderr, "Entered\n");
+ fprintf(stderr, "Mouse enter at %f,%f\n",
+ event->crossing.x, event->crossing.y);
mouseEntered = true;
break;
case PUGL_LEAVE_NOTIFY:
- fprintf(stderr, "Exited\n");
+ fprintf(stderr, "Mouse leave at %f,%f\n",
+ event->crossing.x, event->crossing.y);
mouseEntered = false;
break;
case PUGL_FOCUS_IN:
- fprintf(stderr, "Focus in\n");
+ fprintf(stderr, "Focus in%s\n", event->focus.grab ? " (grab)" : "");
break;
case PUGL_FOCUS_OUT:
- fprintf(stderr, "Focus out\n");
+ fprintf(stderr, "Focus out%s\n", event->focus.grab ? " (ungrab)" : "");
break;
}
}