diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2018-12-20 08:02:30 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2018-12-20 08:02:30 (GMT) |
commit | 81b0bd7641a9d2f63154c97d41c27bbb696ef674 (patch) | |
tree | a17119411589e8c1291df53e2546243d84e78583 /generic/ttk | |
parent | 93d974c265533cf2445446954346be8192e850a0 (diff) | |
download | tk-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/ttk')
-rw-r--r-- | generic/ttk/ttkEntry.c | 10 | ||||
-rw-r--r-- | generic/ttk/ttkLabel.c | 8 |
2 files changed, 9 insertions, 9 deletions
diff --git a/generic/ttk/ttkEntry.c b/generic/ttk/ttkEntry.c index ae43ae6..48aeb5c 100644 --- a/generic/ttk/ttkEntry.c +++ b/generic/ttk/ttkEntry.c @@ -1151,7 +1151,7 @@ static GC EntryGetGC(Entry *entryPtr, Tcl_Obj *colorObj, TkRegion clip) mask |= GCForeground; } gc = Tk_GetGC(entryPtr->core.tkwin, mask, &gcValues); - if (clip != None) { + if (clip) { TkSetRegion(Tk_Display(entryPtr->core.tkwin), gc, clip); } return gc; @@ -1256,7 +1256,7 @@ static void EntryDisplay(void *clientData, Drawable d) gc = EntryGetGC(entryPtr, es.insertColorObj, clipRegion); XFillRectangle(Tk_Display(tkwin), d, gc, cursorX-cursorWidth/2, cursorY, cursorWidth, cursorHeight); - XSetClipMask(Tk_Display(tkwin), gc, None); + XSetClipMask(Tk_Display(tkwin), gc, 0); Tk_FreeGC(Tk_Display(tkwin), gc); } @@ -1267,7 +1267,7 @@ static void EntryDisplay(void *clientData, Drawable d) Tk_Display(tkwin), d, gc, entryPtr->entry.textLayout, entryPtr->entry.layoutX, entryPtr->entry.layoutY, leftIndex, rightIndex); - XSetClipMask(Tk_Display(tkwin), gc, None); + XSetClipMask(Tk_Display(tkwin), gc, 0); Tk_FreeGC(Tk_Display(tkwin), gc); /* Overwrite the selected portion (if any) in the -selectforeground color: @@ -1278,7 +1278,7 @@ static void EntryDisplay(void *clientData, Drawable d) Tk_Display(tkwin), d, gc, entryPtr->entry.textLayout, entryPtr->entry.layoutX, entryPtr->entry.layoutY, selFirst, selLast); - XSetClipMask(Tk_Display(tkwin), gc, None); + XSetClipMask(Tk_Display(tkwin), gc, 0); Tk_FreeGC(Tk_Display(tkwin), gc); } @@ -1286,7 +1286,7 @@ static void EntryDisplay(void *clientData, Drawable d) * it from the Xft guts (if they're being used). */ #ifdef HAVE_XFT - TkUnixSetXftClipRegion(None); + TkUnixSetXftClipRegion(0); #endif TkDestroyRegion(clipRegion); } diff --git a/generic/ttk/ttkLabel.c b/generic/ttk/ttkLabel.c index 1037840..9b80c59 100644 --- a/generic/ttk/ttkLabel.c +++ b/generic/ttk/ttkLabel.c @@ -183,10 +183,10 @@ static void TextDraw(TextElement *text, Tk_Window tkwin, Drawable d, Ttk_Box b) if (clipRegion != NULL) { #ifdef HAVE_XFT - TkUnixSetXftClipRegion(None); + TkUnixSetXftClipRegion(0); #endif - XSetClipMask(Tk_Display(tkwin), gc1, None); - XSetClipMask(Tk_Display(tkwin), gc2, None); + XSetClipMask(Tk_Display(tkwin), gc1, 0); + XSetClipMask(Tk_Display(tkwin), gc2, 0); TkDestroyRegion(clipRegion); } Tk_FreeGC(Tk_Display(tkwin), gc1); @@ -305,7 +305,7 @@ static void StippleOver( Pixmap stipple = Tk_AllocBitmapFromObj(NULL, tkwin, image->stippleObj); XColor *color = Tk_GetColorFromObj(tkwin, image->backgroundObj); - if (stipple != None) { + if (stipple) { unsigned long mask = GCFillStyle | GCStipple | GCForeground; XGCValues gcvalues; GC gc; |