slackbuilds_ponce/accessibility/mag/xdestroyimage.diff
B. Watson 4f82040ebc
accessibility/mag: Fix all-black window bug.
Signed-off-by: B. Watson <yalhcru@gmail.com>

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
2021-12-10 08:37:38 +07:00

18 lines
638 B
Diff

--- mag.c 2010-09-13 13:56:43.000000000 -0400
+++ mag.c.fixed 2021-12-07 23:23:49.729231259 -0500
@@ -174,7 +174,6 @@
ximage=XGetImage(display,root,x-sx,y-sy,width/zoom,height/zoom,AllPlanes,ZPixmap);
// fprintf(stderr,"XGetImage returns:%d\n",(int)ximage);
// XPutImage(display,main_win,the_GC,ximage,0,0,0,0,width,height);
- XDestroyImage(ximage);
for(sx=0;sx<width/zoom;sx++) {
for(sy=0;sy<height/zoom;sy++) {
pix=XGetPixel(ximage,sx,sy);
@@ -186,6 +185,7 @@
}
}
}
+ XDestroyImage(ximage);
XFlush(display);
} else {
usleep(30000);