diff options
author | Mike Blumenkrantz <michael.blumenkrantz@gmail.com> | 2012-10-26 10:45:24 +0000 |
---|---|---|
committer | Mike Blumenkrantz <michael.blumenkrantz@gmail.com> | 2012-10-26 10:45:24 +0000 |
commit | 03b8d16952098f909b088d81f525f45f3a6cd641 (patch) | |
tree | 493b6163a77c94860b404ed823aa29da9c906f60 /src/modules/shot/e_mod_main.c | |
parent | b17f560116d985994bb2030f788a3a203191ee3c (diff) | |
download | enlightenment-03b8d16952098f909b088d81f525f45f3a6cd641.tar.gz enlightenment-03b8d16952098f909b088d81f525f45f3a6cd641.tar.xz enlightenment-03b8d16952098f909b088d81f525f45f3a6cd641.zip |
clamp shots to correct geometry to prevent SIGFPE which hopefully nobody noticed
SVN revision: 78521
Diffstat (limited to 'src/modules/shot/e_mod_main.c')
-rw-r--r-- | src/modules/shot/e_mod_main.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/modules/shot/e_mod_main.c b/src/modules/shot/e_mod_main.c index 85b763ed2..c887705bb 100644 --- a/src/modules/shot/e_mod_main.c +++ b/src/modules/shot/e_mod_main.c @@ -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(); |