mirror of
https://codeberg.org/dnkl/yambar.git
synced 2025-04-22 04:15:39 +02:00
bar: reset cursor and return when mouse is at a border
This commit is contained in:
parent
7da09530b8
commit
421f1466df
1 changed files with 4 additions and 3 deletions
7
bar.c
7
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");
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue