fix placement to actually respect overlay allow of shelves

SVN revision: 41376
devs/princeamd/enlightenment-0.17-elive
Carsten Haitzler 14 years ago
parent a9212e1ecf
commit cb99a78862
  1. 1
      src/bin/e_grabinput.c
  2. 18
      src/bin/e_place.c

@ -121,6 +121,7 @@ _e_grabinput_focus(Ecore_X_Window win, E_Focus_Method method)
break;
case E_FOCUS_METHOD_LOCALLY_ACTIVE:
ecore_x_window_focus(win);
ecore_x_sync(); // let x actually get the x focus request
ecore_x_icccm_take_focus_send(win, ecore_x_current_time_get());
break;
case E_FOCUS_METHOD_GLOBALLY_ACTIVE:

@ -121,7 +121,23 @@ _e_place_coverage_shelf_add(E_Zone *zone, int ar, int x, int y, int w, int h)
if (es->zone != zone) continue;
x2 = es->x; y2 = es->y; w2 = es->w; h2 = es->h;
if (E_INTERSECTS(x, y, w, h, x2, y2, w2, h2))
return 0x7fffffff;
{
int x0, x00, y0, y00;
int iw, ih;
if (!es->cfg->overlap) return 0x7fffffff;
x0 = x;
if (x < x2) x0 = x2;
x00 = (x + w);
if ((x2 + w2) < (x + w)) x00 = (x2 + w2);
y0 = y;
if (y < y2) y0 = y2;
y00 = (y + h);
if ((y2 + h2) < (y + h)) y00 = (y2 + h2);
iw = x00 - x0;
ih = y00 - y0;
ar += (iw * ih);
}
}
return ar;
}

Loading…
Cancel
Save