exposable: log button name in debug log

This commit is contained in:
Daniel Eklöf 2021-06-21 21:02:31 +02:00
parent dd724d1bc2
commit af163d3f77
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F

View file

@ -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");