summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKim Woelders <kim@woelders.dk>2010-02-20 11:51:02 +0000
committerKim Woelders <kim@woelders.dk>2010-02-20 11:51:02 +0000
commit7bf03a945c5a71015e4e5ff6622d1cba1ad2aaf0 (patch)
tree5af4697b7334b079965fda0ade1a3ef2d57b5211
parentb036dd5644bdaa331ebfd1a2576eff013f86d766 (diff)
downloadimlib2-7bf03a945c5a71015e4e5ff6622d1cba1ad2aaf0.tar.gz
Fix excessive checking for shm extension in __imlib_GrabDrawableToRGBA().
SVN revision: 46333
-rw-r--r--src/lib/grab.c1
-rw-r--r--src/lib/ximage.c4
-rw-r--r--src/lib/ximage.h2
3 files changed, 5 insertions, 2 deletions
diff --git a/src/lib/grab.c b/src/lib/grab.c
index 39017dd..41d0ff4 100644
--- a/src/lib/grab.c
+++ b/src/lib/grab.c
@@ -532,7 +532,6 @@ __imlib_GrabDrawableToRGBA(DATA32 * data, int ox, int oy, int ow, int oh,
int width, height, clipx, clipy;
XShmSegmentInfo shminfo, mshminfo;
XImage *xim, *mxim;
- static signed char x_does_shm = -1;
XColor cols[256];
domask = (pdomask) ? *pdomask : 0;
diff --git a/src/lib/ximage.c b/src/lib/ximage.c
index daa3059..ece1635 100644
--- a/src/lib/ximage.c
+++ b/src/lib/ximage.c
@@ -7,8 +7,10 @@
#include <sys/shm.h>
#include "ximage.h"
+/* global flags */
+signed char x_does_shm = -1;
+
/* static private variables */
-static signed char x_does_shm = -1;
static int list_num = 0;
static XImage **list_xim = NULL;
static XShmSegmentInfo **list_si = NULL;
diff --git a/src/lib/ximage.h b/src/lib/ximage.h
index a690f71..ff3cf36 100644
--- a/src/lib/ximage.h
+++ b/src/lib/ximage.h
@@ -4,6 +4,8 @@
#include <X11/Xlib.h>
#include <X11/extensions/XShm.h>
+__hidden signed char x_does_shm;
+
void __imlib_SetMaxXImageCount(Display * d, int num);
__hidden int __imlib_GetMaxXImageCount(Display * d);
__hidden void __imlib_SetMaxXImageTotalSize(Display * d, int num);