From 0ef7e4312136bc4f4b29ba17a9e6ea74a77418d5 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 21 Jul 2019 15:37:39 +0200 Subject: Print more information about crossing and focus events --- pugl_test.c | 10 ++++++---- 1 file 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; } } -- cgit v1.2.1