summaryrefslogtreecommitdiffstats
path: root/generic/tkCanvImg.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2018-12-31 15:56:41 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2018-12-31 15:56:41 (GMT)
commit4224e39596e02ca9cf11a2c160d8f8e7b43a45f9 (patch)
treee78b5e9ecbd064bd24bc43894cd3dd4e9e075480 /generic/tkCanvImg.c
parentccc7f53ac59980eae109a3314ba3599a8b851fb1 (diff)
parentf2b5a87d6dc6d3468828d48929583d950690a40b (diff)
downloadtk-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/tkCanvImg.c')
-rw-r--r--generic/tkCanvImg.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/generic/tkCanvImg.c b/generic/tkCanvImg.c
index c88bb37..899741a 100644
--- a/generic/tkCanvImg.c
+++ b/generic/tkCanvImg.c
@@ -432,16 +432,16 @@ ComputeImageBbox(
Tk_Image image;
Tk_State state = imgPtr->header.state;
- if (state == TK_STATE_NULL) {
+ if(state == TK_STATE_NULL) {
state = Canvas(canvas)->canvas_state;
}
image = imgPtr->image;
if (Canvas(canvas)->currentItemPtr == (Tk_Item *)imgPtr) {
- if (imgPtr->activeImage) {
+ if (imgPtr->activeImage != NULL) {
image = imgPtr->activeImage;
}
} else if (state == TK_STATE_DISABLED) {
- if (imgPtr->disabledImage) {
+ if (imgPtr->disabledImage != NULL) {
image = imgPtr->disabledImage;
}
}
@@ -449,7 +449,7 @@ ComputeImageBbox(
x = (int) (imgPtr->x + ((imgPtr->x >= 0) ? 0.5 : - 0.5));
y = (int) (imgPtr->y + ((imgPtr->y >= 0) ? 0.5 : - 0.5));
- if ((state == TK_STATE_HIDDEN) || !image) {
+ if ((state == TK_STATE_HIDDEN) || (image == None)) {
imgPtr->header.x1 = imgPtr->header.x2 = x;
imgPtr->header.y1 = imgPtr->header.y2 = y;
return;