From af163d3f77667b5eb1589c2ec84bea5172777d45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Mon, 21 Jun 2021 21:02:31 +0200 Subject: [PATCH] exposable: log button name in debug log --- particle.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/particle.c b/particle.c index 2ce4800..ad76965 100644 --- a/particle.c +++ b/particle.c @@ -144,9 +144,10 @@ exposable_default_on_mouse(struct exposable *exposable, struct bar *bar, enum mouse_event event, enum mouse_button btn, int x, int y) { - LOG_DBG("on_mouse: exposable=%p, event=%s, btn=%d, x=%d, y=%d (on-click=%s)", - exposable, event == ON_MOUSE_MOTION ? "motion" : "click", btn, x, y, - exposable->on_click); + LOG_DBG("on_mouse: exposable=%p, event=%s, btn=%s, x=%d, y=%d (on-click=%s)", + exposable, event == ON_MOUSE_MOTION ? "motion" : "click", + btn == MOUSE_BTN_NONE ? "none" : btn == MOUSE_BTN_LEFT ? "left" : btn == MOUSE_BTN_MIDDLE ? "middle" : "right", + x, y, exposable->on_click); /* If we have a handler, change cursor to a hand */ bar->set_cursor(bar, exposable->on_click == NULL ? "left_ptr" : "hand2");