Ignore empty areas for mouse events

This commit is contained in:
o9000 2016-03-25 11:12:26 +01:00
parent 0bd49f4227
commit 76bd4baa9c

View file

@ -594,7 +594,7 @@ gboolean area_is_first(void *obj)
Area *node = &panel->area; Area *node = &panel->area;
while (node) { while (node) {
if (!node->on_screen) if (!node->on_screen || node->width == 0 || node->height == 0)
return FALSE; return FALSE;
if (node == a) if (node == a)
return TRUE; return TRUE;
@ -603,7 +603,7 @@ gboolean area_is_first(void *obj)
node = NULL; node = NULL;
for (; l; l = l->next) { for (; l; l = l->next) {
Area *child = l->data; Area *child = l->data;
if (!child->on_screen) if (!child->on_screen || child->width == 0 || child->height == 0)
continue; continue;
node = child; node = child;
break; break;
@ -624,7 +624,7 @@ gboolean area_is_last(void *obj)
Area *node = &panel->area; Area *node = &panel->area;
while (node) { while (node) {
if (!node->on_screen) if (!node->on_screen || node->width == 0 || node->height == 0)
return FALSE; return FALSE;
if (node == a) if (node == a)
return TRUE; return TRUE;
@ -633,7 +633,7 @@ gboolean area_is_last(void *obj)
node = NULL; node = NULL;
for (; l; l = l->next) { for (; l; l = l->next) {
Area *child = l->data; Area *child = l->data;
if (!child->on_screen) if (!child->on_screen || child->width == 0 || child->height == 0)
continue; continue;
node = child; node = child;
} }
@ -645,7 +645,7 @@ gboolean area_is_last(void *obj)
gboolean area_is_under_mouse(void *obj, int x, int y) gboolean area_is_under_mouse(void *obj, int x, int y)
{ {
Area *a = obj; Area *a = obj;
if (!a->on_screen) if (!a->on_screen || a->width == 0 || a->height == 0)
return FALSE; return FALSE;
if (a->_is_under_mouse) if (a->_is_under_mouse)