diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2018-12-31 15:56:41 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2018-12-31 15:56:41 (GMT) |
commit | 4224e39596e02ca9cf11a2c160d8f8e7b43a45f9 (patch) | |
tree | e78b5e9ecbd064bd24bc43894cd3dd4e9e075480 /generic/ttk | |
parent | ccc7f53ac59980eae109a3314ba3599a8b851fb1 (diff) | |
parent | f2b5a87d6dc6d3468828d48929583d950690a40b (diff) | |
download | tk-4224e39596e02ca9cf11a2c160d8f8e7b43a45f9.zip tk-4224e39596e02ca9cf11a2c160d8f8e7b43a45f9.tar.gz tk-4224e39596e02ca9cf11a2c160d8f8e7b43a45f9.tar.bz2 |
As requested by Christian Werner/François Vogel and others: Undo many None -> 0 changes, in order to reduce the probability of merge conflicts with other branches.
Remark: Many usages of "None" in Tk are wrong, "NULL" should be used in many places where pointers are referenced in stead of XID's. Those places are corrected.
Diffstat (limited to 'generic/ttk')
-rw-r--r-- | generic/ttk/ttkEntry.c | 8 | ||||
-rw-r--r-- | generic/ttk/ttkLabel.c | 8 |
2 files changed, 8 insertions, 8 deletions
diff --git a/generic/ttk/ttkEntry.c b/generic/ttk/ttkEntry.c index 1e17d54..a8bb717 100644 --- a/generic/ttk/ttkEntry.c +++ b/generic/ttk/ttkEntry.c @@ -1155,7 +1155,7 @@ static GC EntryGetGC(Entry *entryPtr, Tcl_Obj *colorObj, TkRegion clip) mask |= GCForeground; } gc = Tk_GetGC(entryPtr->core.tkwin, mask, &gcValues); - if (clip) { + if (clip != None) { TkSetRegion(Tk_Display(entryPtr->core.tkwin), gc, clip); } return gc; @@ -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, leftIndex, rightIndex); - XSetClipMask(Tk_Display(tkwin), gc, 0); + XSetClipMask(Tk_Display(tkwin), gc, None); Tk_FreeGC(Tk_Display(tkwin), gc); /* Overwrite the selected portion (if any) in the -selectforeground color: @@ -1289,7 +1289,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, 0); + XSetClipMask(Tk_Display(tkwin), gc, None); Tk_FreeGC(Tk_Display(tkwin), gc); } @@ -1297,7 +1297,7 @@ static void EntryDisplay(void *clientData, Drawable d) * it from the Xft guts (if they're being used). */ #ifdef HAVE_XFT - TkUnixSetXftClipRegion(0); + TkUnixSetXftClipRegion(None); #endif TkDestroyRegion(clipRegion); } diff --git a/generic/ttk/ttkLabel.c b/generic/ttk/ttkLabel.c index 9b80c59..1037840 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(0); + TkUnixSetXftClipRegion(None); #endif - XSetClipMask(Tk_Display(tkwin), gc1, 0); - XSetClipMask(Tk_Display(tkwin), gc2, 0); + XSetClipMask(Tk_Display(tkwin), gc1, None); + XSetClipMask(Tk_Display(tkwin), gc2, None); 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) { + if (stipple != None) { unsigned long mask = GCFillStyle | GCStipple | GCForeground; XGCValues gcvalues; GC gc; |