From 421f1466dfb88f9ab050843bdea4e75ccdaf8fd1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Sat, 29 Dec 2018 17:13:38 +0100 Subject: [PATCH] bar: reset cursor and return when mouse is at a border --- bar.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/bar.c b/bar.c index 14a8149..16fbc53 100644 --- a/bar.c +++ b/bar.c @@ -262,8 +262,10 @@ on_mouse(struct bar *bar, enum mouse_event event, int x, int y) struct private *b = bar->private; if ((y < b->border.width || y >= (b->height_with_border - b->border.width)) || - (x < b->border.width || x >= (b->width - b->border.width))) { - LOG_DBG("mouse at border"); + (x < b->border.width || x >= (b->width - b->border.width))) + { + set_cursor(bar, "left_ptr"); + return; } int left_width, center_width, right_width; @@ -314,7 +316,6 @@ on_mouse(struct bar *bar, enum mouse_event event, int x, int y) mx += e->width + b->right_spacing; } - LOG_DBG("mouse at NOTHING"); set_cursor(bar, "left_ptr"); }