summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authorculler <culler>2020-05-12 22:29:00 (GMT)
committerculler <culler>2020-05-12 22:29:00 (GMT)
commitec21fa41c6a2e325394c84f28c93faa2465ed7d6 (patch)
treeea3bd942b43ba663745aec6cd8b2e364e3be2dfe /generic
parentd398007da89f23ce1c7ba75aadce5c13b9254134 (diff)
downloadtk-ec21fa41c6a2e325394c84f28c93faa2465ed7d6.zip
tk-ec21fa41c6a2e325394c84f28c93faa2465ed7d6.tar.gz
tk-ec21fa41c6a2e325394c84f28c93faa2465ed7d6.tar.bz2
Use SET_NUMBER for Bool fields and make sure they print as Booleans; remove a couple of redundant assignments.
Diffstat (limited to 'generic')
-rw-r--r--generic/tkBind.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/generic/tkBind.c b/generic/tkBind.c
index c4578ed..5f2af9f 100644
--- a/generic/tkBind.c
+++ b/generic/tkBind.c
@@ -3004,7 +3004,7 @@ ExpandPercents(
break;
case 'f':
if (flags & CROSSING) {
- SET_UNUMBER(evPtr->xcrossing.focus);
+ SET_NUMBER(evPtr->xcrossing.focus != 0);
}
break;
case 'h':
@@ -3046,13 +3046,13 @@ ExpandPercents(
break;
case 'o':
if (flags & CREATE) {
- SET_UNUMBER(evPtr->xcreatewindow.override_redirect);
+ SET_NUMBER(evPtr->xcreatewindow.override_redirect != 0);
} else if (flags & MAP) {
- SET_UNUMBER(evPtr->xmap.override_redirect);
+ SET_NUMBER(evPtr->xmap.override_redirect != 0);
} else if (flags & REPARENT) {
- SET_UNUMBER(evPtr->xreparent.override_redirect);
+ SET_NUMBER(evPtr->xreparent.override_redirect != 0);
} else if (flags & CONFIG) {
- SET_UNUMBER(evPtr->xconfigure.override_redirect);
+ SET_NUMBER(evPtr->xconfigure.override_redirect != 0);
}
break;
case 'p':
@@ -3105,8 +3105,6 @@ ExpandPercents(
SET_NUMBER(evPtr->xcreatewindow.x);
} else if (flags & REPARENT) {
SET_NUMBER(evPtr->xreparent.x);
- } else if (flags & CREATE) {
- SET_NUMBER(evPtr->xcreatewindow.x);
} else if (flags & CONFIGREQ) {
SET_NUMBER(evPtr->xconfigurerequest.x);
}
@@ -3120,8 +3118,6 @@ ExpandPercents(
SET_NUMBER(evPtr->xcreatewindow.y);
} else if (flags & REPARENT) {
SET_NUMBER(evPtr->xreparent.y);
- } else if (flags & CREATE) {
- SET_NUMBER(evPtr->xcreatewindow.y);
} else if (flags & CONFIGREQ) {
SET_NUMBER(evPtr->xconfigurerequest.y);
}
@@ -3147,7 +3143,7 @@ ExpandPercents(
}
break;
case 'E':
- SET_UNUMBER(evPtr->xany.send_event);
+ SET_NUMBER(evPtr->xany.send_event != 0);
break;
case 'K':
if (flags & KEY) {