forked from enlightenment/efl
clamp size to ximage size for ecore_x_image_get to prevent BadMatch errors
This commit is contained in:
parent
d9aa0fccd9
commit
c3916df200
|
@ -1,3 +1,7 @@
|
|||
2013-07-15 Mike Blumenkrantz
|
||||
|
||||
* Ecore-X: fix BadMatch errors in ecore_x_image_get when requested size was larger than XImage size
|
||||
|
||||
2013-07-15 Cedric Bail
|
||||
|
||||
* Eet: Add support for EET_T_VALUE to serialize Eina_Value pointer.
|
||||
|
|
1
NEWS
1
NEWS
|
@ -342,6 +342,7 @@ Fixes:
|
|||
- Fix alpha set function not clear sync counter.
|
||||
- Fix selection parser to not overrun buffer read by using longs on 64bit.
|
||||
- Fix x11 selection trailing nul byte in text.
|
||||
- Fix BadMatch errors in ecore_x_image_get when requested size was larger than XImage size
|
||||
* Ecore_Wayland:
|
||||
- Fix return type of function ecore_wl_outputs_get().
|
||||
* Ecore_Input_Evas:
|
||||
|
|
|
@ -96,8 +96,8 @@ ecore_x_image_get(Ecore_X_Image *im,
|
|||
{
|
||||
im->xim->data = (uint8_t *)im->data + (im->xim->stride * sy) +
|
||||
(sx * im->bpp);
|
||||
im->xim->width = w;
|
||||
im->xim->height = h;
|
||||
im->xim->width = MIN(w, im->w);
|
||||
im->xim->height = MIN(h, im->h);
|
||||
|
||||
ecore_x_grab();
|
||||
if (!xcb_image_shm_get(_ecore_xcb_conn, draw, im->xim,
|
||||
|
|
|
@ -293,8 +293,8 @@ ecore_x_image_get(Ecore_X_Image *im,
|
|||
{
|
||||
im->xim->data = (char *)
|
||||
im->data + (im->xim->bytes_per_line * sy) + (sx * im->bpp);
|
||||
im->xim->width = w;
|
||||
im->xim->height = h;
|
||||
im->xim->width = MIN(w, im->w);
|
||||
im->xim->height = MIN(h, im->h);
|
||||
XGrabServer(_ecore_x_disp);
|
||||
if (!XShmGetImage(_ecore_x_disp, draw, im->xim, x, y, 0xffffffff))
|
||||
ret = EINA_FALSE;
|
||||
|
|
Loading…
Reference in New Issue