summaryrefslogtreecommitdiffstats
path: root/generic/tkEvent.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/tkEvent.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/tkEvent.c')
-rw-r--r--generic/tkEvent.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/generic/tkEvent.c b/generic/tkEvent.c
index 8320ec9..b68ba54 100644
--- a/generic/tkEvent.c
+++ b/generic/tkEvent.c
@@ -416,11 +416,11 @@ GetTkWindowFromXEvent(
}
TkSelPropProc(eventPtr);
parentXId = ParentXId(eventPtr->xany.display, handlerWindow);
- if (!parentXId) {
+ if (parentXId == None) {
return NULL;
}
winPtr = (TkWindow *) Tk_IdToWindow(eventPtr->xany.display, parentXId);
- if (!winPtr) {
+ if (winPtr == NULL) {
return NULL;
}
if (!(winPtr->flags & TK_PROP_PROPCHANGE)) {
@@ -596,7 +596,7 @@ UpdateButtonEventState(
case ButtonRelease:
dispPtr = TkGetDisplay(eventPtr->xbutton.display);
- dispPtr->mouseButtonWindow = 0;
+ dispPtr->mouseButtonWindow = None;
dispPtr->mouseButtonState &= ~GetButtonMask(eventPtr->xbutton.button);
eventPtr->xbutton.state |= dispPtr->mouseButtonState;
break;
@@ -612,7 +612,7 @@ UpdateButtonEventState(
*/
dispPtr->mouseButtonState &= ~allButtonsMask;
- dispPtr->mouseButtonWindow = 0;
+ dispPtr->mouseButtonWindow = None;
} else {
eventPtr->xmotion.state |= dispPtr->mouseButtonState;
}
@@ -1185,7 +1185,7 @@ ParentXId(
XFree(childList);
}
if (status == 0) {
- parent = 0;
+ parent = None;
}
return parent;
@@ -1368,7 +1368,7 @@ Tk_HandleEvent(
* handle CreateNotify events, so we gotta pass 'em through.
*/
- if ((ip.winPtr)
+ if ((ip.winPtr != None)
&& ((mask != SubstructureNotifyMask)
|| (eventPtr->type == CreateNotify))) {
TkBindEventProc(winPtr, eventPtr);
@@ -1382,7 +1382,7 @@ Tk_HandleEvent(
*/
releaseInterpreter:
- if (interp) {
+ if (interp != NULL) {
Tcl_Release(interp);
}
@@ -1430,7 +1430,7 @@ TkEventDeadWindow(
* to quit (all of the handlers are being deleted).
*/
- while (winPtr->handlerList) {
+ while (winPtr->handlerList != NULL) {
handlerPtr = winPtr->handlerList;
winPtr->handlerList = handlerPtr->nextPtr;
for (ipPtr = tsdPtr->pendingPtr; ipPtr != NULL;