diff options
Diffstat (limited to 'generic')
-rw-r--r-- | generic/Image.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/generic/Image.c b/generic/Image.c index 7d01de9..1ce7dc7 100644 --- a/generic/Image.c +++ b/generic/Image.c @@ -57,7 +57,7 @@ typedef struct _ImageStruct { struct { Pixmap pixmap; Pixmap mask_pmap; - Display *dpy; + Screen *screen; } x; struct { #ifdef GLX @@ -373,7 +373,7 @@ GetImageInstance(WidgetInfo *wi, image->refcount++; return image; } - else if (!for_gl && (image->i.x.dpy == wi->dpy)) { + else if (!for_gl && (image->i.x.screen == wi->screen)) { image->refcount++; return image; } @@ -393,7 +393,7 @@ GetImageInstance(WidgetInfo *wi, #endif } else { - image->i.x.dpy = wi->dpy; + image->i.x.screen = wi->screen; image->i.x.pixmap = XCreatePixmap(wi->dpy, RootWindowOfScreen(wi->screen), bits->width, bits->height, depth); gc = XCreateGC(wi->dpy, image->i.x.pixmap, 0, NULL); @@ -562,7 +562,7 @@ ZnGetBitmap(WidgetInfo *wi, image->refcount++; return image; } - else if (!for_gl && (image->i.x.dpy == wi->dpy)) { + else if (!for_gl && (image->i.x.screen == wi->screen)) { image->refcount++; return image; } @@ -583,7 +583,7 @@ ZnGetBitmap(WidgetInfo *wi, #endif } else { - image->i.x.dpy = wi->dpy; + image->i.x.screen = wi->screen; image->i.x.mask_pmap = None; /* * Need to get a pixmap that match this dpy. @@ -661,17 +661,17 @@ ZnFreeImage(ZnImage image) * This is an image, we need to free the pixmaps. */ if (this->i.x.pixmap != None) { - XFreePixmap(this->i.x.dpy, this->i.x.pixmap); + XFreePixmap(DisplayOfScreen(this->i.x.screen), this->i.x.pixmap); } if (this->i.x.mask_pmap != None) { - XFreePixmap(this->i.x.dpy, this->i.x.mask_pmap); + XFreePixmap(DisplayOfScreen(this->i.x.screen), this->i.x.mask_pmap); } } else { /* * This is a bitmap ask Tk to free the resource. */ - Tk_FreeBitmap(this->i.x.dpy, this->i.x.pixmap); + Tk_FreeBitmap(DisplayOfScreen(this->i.x.screen), this->i.x.pixmap); } ZnFree(this); @@ -849,7 +849,7 @@ ZnImageTex(ZnImage image, depth = DefaultDepthOfScreen(this->i.gl.wi->screen); } else { - depth = DefaultDepthOfScreen(DefaultScreenOfDisplay(this->i.x.dpy)); + depth = DefaultDepthOfScreen(this->i.x.screen); } if (depth == 16) { From5r6g5b(bits->ipixels->data, bits->width, bits->height, |