forked from enlightenment/enlightenment
clamp shots to correct geometry to prevent SIGFPE which hopefully nobody noticed
SVN revision: 78521
This commit is contained in:
parent
b17f560116
commit
03b8d16952
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue