summaryrefslogtreecommitdiffstats
path: root/generic/tkImgPhoto.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2018-12-20 08:02:30 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2018-12-20 08:02:30 (GMT)
commit81b0bd7641a9d2f63154c97d41c27bbb696ef674 (patch)
treea17119411589e8c1291df53e2546243d84e78583 /generic/tkImgPhoto.c
parent93d974c265533cf2445446954346be8192e850a0 (diff)
downloadtk-81b0bd7641a9d2f63154c97d41c27bbb696ef674.zip
tk-81b0bd7641a9d2f63154c97d41c27bbb696ef674.tar.gz
tk-81b0bd7641a9d2f63154c97d41c27bbb696ef674.tar.bz2
Fix [9e31fd944934e269121fa78ff56b7b86f33e6db6|9e31fd9449]: X11/X.h and Windows.h have conflicting symbols.
Also fix a few newer (harmless) gcc warnings.
Diffstat (limited to 'generic/tkImgPhoto.c')
-rw-r--r--generic/tkImgPhoto.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/generic/tkImgPhoto.c b/generic/tkImgPhoto.c
index 4e1aa01..d1503f6 100644
--- a/generic/tkImgPhoto.c
+++ b/generic/tkImgPhoto.c
@@ -2285,7 +2285,7 @@ ImgPhotoConfigureInstance(
* has the side effect of allocating a pixmap for us.
*/
- if ((instancePtr->pixels == None) || (instancePtr->error == NULL)
+ if (!instancePtr->pixels || !instancePtr->error
|| (instancePtr->width != masterPtr->width)
|| (instancePtr->height != masterPtr->height)) {
ImgPhotoInstanceSetSize(instancePtr);
@@ -2403,7 +2403,7 @@ ImgPhotoGet(
Tk_PreserveColormap(instancePtr->display, instancePtr->colormap);
instancePtr->refCount = 1;
instancePtr->colorTablePtr = NULL;
- instancePtr->pixels = None;
+ instancePtr->pixels = 0;
instancePtr->error = NULL;
instancePtr->width = 0;
instancePtr->height = 0;
@@ -2776,7 +2776,7 @@ ImgPhotoDisplay(
* the image instance so it can't be displayed.
*/
- if (instancePtr->pixels == None) {
+ if (!instancePtr->pixels) {
return;
}
@@ -2834,7 +2834,7 @@ ImgPhotoDisplay(
XCopyArea(display, instancePtr->pixels, drawable, instancePtr->gc,
imageX, imageY, (unsigned) width, (unsigned) height,
drawableX, drawableY);
- XSetClipMask(display, instancePtr->gc, None);
+ XSetClipMask(display, instancePtr->gc, 0);
XSetClipOrigin(display, instancePtr->gc, 0, 0);
}
XFlush(display);
@@ -3196,7 +3196,7 @@ ImgPhotoInstanceSetSize(
if ((instancePtr->width != masterPtr->width)
|| (instancePtr->height != masterPtr->height)
- || (instancePtr->pixels == None)) {
+ || !instancePtr->pixels) {
newPixmap = Tk_GetPixmap(instancePtr->display,
RootWindow(instancePtr->display,
instancePtr->visualInfo.screen),
@@ -3218,7 +3218,7 @@ ImgPhotoInstanceSetSize(
TkSetPixmapColormap(newPixmap, instancePtr->colormap);
- if (instancePtr->pixels != None) {
+ if (instancePtr->pixels) {
/*
* Copy any common pixels from the old pixmap and free it.
*/
@@ -3995,19 +3995,19 @@ DisposeInstance(
PhotoInstance *instancePtr = (PhotoInstance *) clientData;
PhotoInstance *prevPtr;
- if (instancePtr->pixels != None) {
+ if (instancePtr->pixels) {
Tk_FreePixmap(instancePtr->display, instancePtr->pixels);
}
- if (instancePtr->gc != None) {
+ if (instancePtr->gc) {
Tk_FreeGC(instancePtr->display, instancePtr->gc);
}
- if (instancePtr->imagePtr != NULL) {
+ if (instancePtr->imagePtr) {
XDestroyImage(instancePtr->imagePtr);
}
- if (instancePtr->error != NULL) {
+ if (instancePtr->error) {
ckfree((char *) instancePtr->error);
}
- if (instancePtr->colorTablePtr != NULL) {
+ if (instancePtr->colorTablePtr) {
FreeColorTable(instancePtr->colorTablePtr, 1);
}