diff --git a/src/bin/e_shelf.c b/src/bin/e_shelf.c index 08a195592..a02aea4c7 100644 --- a/src/bin/e_shelf.c +++ b/src/bin/e_shelf.c @@ -28,6 +28,7 @@ static int _e_shelf_gadcon_client_add(void *data, const E_Gadcon_Client_Class *c static const char * _e_shelf_orient_icon_name_get(E_Shelf *s); static void _e_shelf_bindings_add(E_Shelf *es); static void _e_shelf_bindings_del(E_Shelf *es); +static Eina_Bool _e_shelf_on_current_desk(E_Shelf *es, E_Event_Zone_Edge *ev); static Eina_List *shelves = NULL; static Eina_Hash *winid_shelves = NULL; @@ -1360,6 +1361,8 @@ _e_shelf_cb_mouse_in(void *data, int type, void *event) ev = event; if (es->zone != ev->zone) return ECORE_CALLBACK_PASS_ON; + if (!_e_shelf_on_current_desk(es, ev)) return ECORE_CALLBACK_PASS_ON; + switch (es->gadcon->orient) { case E_GADCON_ORIENT_FLOAT: @@ -1844,3 +1847,28 @@ _e_shelf_bindings_del(E_Shelf *es) for (edge = E_ZONE_EDGE_LEFT; edge <= E_ZONE_EDGE_BOTTOM_LEFT; edge++) e_bindings_edge_del(E_BINDING_CONTEXT_ZONE, edge, E_BINDING_MODIFIER_NONE, 1, buf, NULL, 0); } + +static Eina_Bool +_e_shelf_on_current_desk(E_Shelf *es, E_Event_Zone_Edge *ev) +{ + E_Config_Shelf_Desk *sd; + Eina_List *ll; + int on_current_desk = 0; + int on_all_desks = 1; + + EINA_LIST_FOREACH(es->cfg->desk_list, ll, sd) + { + if (!sd) continue; + on_all_desks = 0; + if ((sd->x == ev->zone->desk_x_current) && (sd->y == ev->zone->desk_y_current)) + { + on_current_desk = 1; + break; + } + } + if (!on_all_desks && !on_current_desk) + return EINA_FALSE; + + + return EINA_TRUE; +}