From 400f966b70dbc3529bcf4a2188340e0b2dfe9d40 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Mon, 9 Dec 2013 07:26:33 -0500 Subject: [PATCH] improve efm popup display with multiple monitors previously we'd clamp to the current screen, but that's not really necessary. also e_popup sucks, so trying to create zone-relative coords is not going to work -> just use first zone always --- src/modules/fileman/e_fwin.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/modules/fileman/e_fwin.c b/src/modules/fileman/e_fwin.c index f43479cbb..ca7bf1651 100644 --- a/src/modules/fileman/e_fwin.c +++ b/src/modules/fileman/e_fwin.c @@ -819,8 +819,8 @@ _e_fwin_icon_popup(void *data) y -= fwin->zone->y; } else - fx = fwin->win->x, fy = fwin->win->y; - fwin->popup = e_popup_new(zone, 0, 0, 1, 1); + fx = fwin->win->border->x, fy = fwin->win->border->y; + fwin->popup = e_popup_new(eina_list_data_get(zone->container->zones), 0, 0, 1, 1); e_popup_ignore_events_set(fwin->popup, 1); bg = edje_object_add(fwin->popup->evas); @@ -850,7 +850,7 @@ _e_fwin_icon_popup(void *data) /* if it's offscreen, try right of icon */ if (px < 0) px = (fx + x + w) + 3; /* fuck this, stick it right on the icon */ - if (px + mw + 3 > zone->w) + if ((px + mw + 3 > zone->x + zone->w) && (!e_zone_exists_direction(zone, E_ZONE_EDGE_RIGHT))) px = (x + w / 2) - (mw / 2); /* give up */ if (px < 0) px = 0; @@ -860,7 +860,7 @@ _e_fwin_icon_popup(void *data) /* if it's offscreen, try below icon */ if (py < 0) py = (fy + y + h) + 3; /* fuck this, stick it right on the icon */ - if (py + mh + 3 > zone->h) + if ((py + mh + 3 > zone->x + zone->h) && (!e_zone_exists_direction(zone, E_ZONE_EDGE_BOTTOM))) py = (y + h / 2) - (mh / 2); /* give up */ if (py < 0) py = 0;