summaryrefslogtreecommitdiffstats
path: root/generic/tkEvent.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2018-12-20 09:44:05 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2018-12-20 09:44:05 (GMT)
commite26cd8eb2b04a4bd764e382cbcbfe4b1030796c6 (patch)
tree6bca925436edc8dce431cfd10502d50117b62d46 /generic/tkEvent.c
parent0c4227b6cc6e9716ddd086a75e45c4e9373fa51b (diff)
parent81b0bd7641a9d2f63154c97d41c27bbb696ef674 (diff)
downloadtk-e26cd8eb2b04a4bd764e382cbcbfe4b1030796c6.zip
tk-e26cd8eb2b04a4bd764e382cbcbfe4b1030796c6.tar.gz
tk-e26cd8eb2b04a4bd764e382cbcbfe4b1030796c6.tar.bz2
Fix [9e31fd9449]: X11/X.h and Windows.h have conflicting symbols
*** POTENTIAL INCOMPATIBILITY *** for Win32 only: On X11 and Mac, "None" can still be used as before
Diffstat (limited to 'generic/tkEvent.c')
-rw-r--r--generic/tkEvent.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/generic/tkEvent.c b/generic/tkEvent.c
index d058e7c..8320ec9 100644
--- a/generic/tkEvent.c
+++ b/generic/tkEvent.c
@@ -416,11 +416,11 @@ GetTkWindowFromXEvent(
}
TkSelPropProc(eventPtr);
parentXId = ParentXId(eventPtr->xany.display, handlerWindow);
- if (parentXId == None) {
+ if (!parentXId) {
return NULL;
}
winPtr = (TkWindow *) Tk_IdToWindow(eventPtr->xany.display, parentXId);
- if (winPtr == NULL) {
+ if (!winPtr) {
return NULL;
}
if (!(winPtr->flags & TK_PROP_PROPCHANGE)) {
@@ -596,7 +596,7 @@ UpdateButtonEventState(
case ButtonRelease:
dispPtr = TkGetDisplay(eventPtr->xbutton.display);
- dispPtr->mouseButtonWindow = None;
+ dispPtr->mouseButtonWindow = 0;
dispPtr->mouseButtonState &= ~GetButtonMask(eventPtr->xbutton.button);
eventPtr->xbutton.state |= dispPtr->mouseButtonState;
break;
@@ -612,7 +612,7 @@ UpdateButtonEventState(
*/
dispPtr->mouseButtonState &= ~allButtonsMask;
- dispPtr->mouseButtonWindow = None;
+ dispPtr->mouseButtonWindow = 0;
} else {
eventPtr->xmotion.state |= dispPtr->mouseButtonState;
}
@@ -1185,7 +1185,7 @@ ParentXId(
XFree(childList);
}
if (status == 0) {
- parent = None;
+ parent = 0;
}
return parent;
@@ -1368,7 +1368,7 @@ Tk_HandleEvent(
* handle CreateNotify events, so we gotta pass 'em through.
*/
- if ((ip.winPtr != None)
+ if ((ip.winPtr)
&& ((mask != SubstructureNotifyMask)
|| (eventPtr->type == CreateNotify))) {
TkBindEventProc(winPtr, eventPtr);
@@ -1382,7 +1382,7 @@ Tk_HandleEvent(
*/
releaseInterpreter:
- if (interp != NULL) {
+ if (interp) {
Tcl_Release(interp);
}
@@ -1430,7 +1430,7 @@ TkEventDeadWindow(
* to quit (all of the handlers are being deleted).
*/
- while (winPtr->handlerList != NULL) {
+ while (winPtr->handlerList) {
handlerPtr = winPtr->handlerList;
winPtr->handlerList = handlerPtr->nextPtr;
for (ipPtr = tsdPtr->pendingPtr; ipPtr != NULL;
@@ -1439,7 +1439,7 @@ TkEventDeadWindow(
ipPtr->nextHandler = NULL;
}
if (ipPtr->winPtr == winPtr) {
- ipPtr->winPtr = None;
+ ipPtr->winPtr = 0;
}
}
ckfree(handlerPtr);