clamp shots to correct geometry to prevent SIGFPE which hopefully nobody noticed

SVN revision: 78521
This commit is contained in:
Mike Blumenkrantz 2012-10-26 10:45:24 +00:00
parent b17f560116
commit 03b8d16952
1 changed files with 4 additions and 4 deletions

View File

@ -604,10 +604,10 @@ _shot_now(E_Zone *zone, E_Border *bd)
xwin = ecore_x_window_parent_get(xwin);
}
ecore_x_window_geometry_get(xwin, NULL, NULL, &sw, &sh);
x = E_CLAMP(bd->x, bd->zone->x, bd->zone->w);
y = E_CLAMP(bd->y, bd->zone->y, bd->zone->h);
sw = E_CLAMP(sw, 0, bd->zone->w - x);
sh = E_CLAMP(sh, 0, bd->zone->h - y);
x = E_CLAMP(bd->x, bd->zone->x, bd->zone->x + bd->zone->w);
y = E_CLAMP(bd->y, bd->zone->y, bd->zone->y + bd->zone->h);
sw = E_CLAMP(sw, 0, bd->zone->x + bd->zone->w - x);
sh = E_CLAMP(sh, 0, bd->zone->y + bd->zone->h - y);
}
display = ecore_x_display_get();
scr = ecore_x_default_screen_get();