From 76bd4baa9c7bf77b6fa7086f42b3df4a62d93264 Mon Sep 17 00:00:00 2001 From: o9000 Date: Fri, 25 Mar 2016 11:12:26 +0100 Subject: [PATCH] Ignore empty areas for mouse events --- src/util/area.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/util/area.c b/src/util/area.c index 4c408df..03f553e 100644 --- a/src/util/area.c +++ b/src/util/area.c @@ -594,7 +594,7 @@ gboolean area_is_first(void *obj) Area *node = &panel->area; while (node) { - if (!node->on_screen) + if (!node->on_screen || node->width == 0 || node->height == 0) return FALSE; if (node == a) return TRUE; @@ -603,7 +603,7 @@ gboolean area_is_first(void *obj) node = NULL; for (; l; l = l->next) { Area *child = l->data; - if (!child->on_screen) + if (!child->on_screen || child->width == 0 || child->height == 0) continue; node = child; break; @@ -624,7 +624,7 @@ gboolean area_is_last(void *obj) Area *node = &panel->area; while (node) { - if (!node->on_screen) + if (!node->on_screen || node->width == 0 || node->height == 0) return FALSE; if (node == a) return TRUE; @@ -633,7 +633,7 @@ gboolean area_is_last(void *obj) node = NULL; for (; l; l = l->next) { Area *child = l->data; - if (!child->on_screen) + if (!child->on_screen || child->width == 0 || child->height == 0) continue; node = child; } @@ -645,7 +645,7 @@ gboolean area_is_last(void *obj) gboolean area_is_under_mouse(void *obj, int x, int y) { Area *a = obj; - if (!a->on_screen) + if (!a->on_screen || a->width == 0 || a->height == 0) return FALSE; if (a->_is_under_mouse)