summaryrefslogtreecommitdiffstats
path: root/win/tkWinWm.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 /win/tkWinWm.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 'win/tkWinWm.c')
-rw-r--r--win/tkWinWm.c42
1 files changed, 21 insertions, 21 deletions
diff --git a/win/tkWinWm.c b/win/tkWinWm.c
index 4e7618d..7c73094 100644
--- a/win/tkWinWm.c
+++ b/win/tkWinWm.c
@@ -978,7 +978,7 @@ WinSetIcon(
NULL);
return TCL_ERROR;
}
- if (Tk_WindowId(tkw) == None) {
+ if (!Tk_WindowId(tkw)) {
Tk_MakeWindowExist(tkw);
}
@@ -1144,7 +1144,7 @@ TkWinGetIcon(
}
}
- if (Tk_WindowId(tkwin) == None) {
+ if (!Tk_WindowId(tkwin)) {
Tk_MakeWindowExist(tkwin);
}
@@ -1922,11 +1922,11 @@ TkWmNewWindow(
wmPtr->hints.flags = InputHint | StateHint;
wmPtr->hints.input = True;
wmPtr->hints.initial_state = NormalState;
- wmPtr->hints.icon_pixmap = None;
- wmPtr->hints.icon_window = None;
+ wmPtr->hints.icon_pixmap = 0;
+ wmPtr->hints.icon_window = 0;
wmPtr->hints.icon_x = wmPtr->hints.icon_y = 0;
- wmPtr->hints.icon_mask = None;
- wmPtr->hints.window_group = None;
+ wmPtr->hints.icon_mask = 0;
+ wmPtr->hints.window_group = 0;
/*
* Default the maximum dimensions to the size of the display.
@@ -2007,7 +2007,7 @@ UpdateWrapper(
ThreadSpecificData *tsdPtr =
Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData));
- if (winPtr->window == None) {
+ if (!winPtr->window) {
/*
* Ensure existence of the window to update the wrapper for.
*/
@@ -2625,7 +2625,7 @@ TkWmDeadWindow(
VisibilityChangeMask|StructureNotifyMask,
WmWaitVisibilityOrMapProc, wmPtr2->winPtr);
wmPtr2->masterPtr = NULL;
- if ((wmPtr2->wrapper != None)
+ if (wmPtr2->wrapper
&& !(wmPtr2->flags & (WM_NEVER_MAPPED))) {
UpdateWrapper(wmPtr2->winPtr);
}
@@ -3433,7 +3433,7 @@ WmColormapwindowsCmd(
if (winPtr2 == winPtr) {
gotToplevel = 1;
}
- if (winPtr2->window == None) {
+ if (!winPtr2->window) {
Tk_MakeWindowExist((Tk_Window) winPtr2);
}
cmapList[i] = winPtr2;
@@ -3721,7 +3721,7 @@ WmFrameCmd(
Tcl_WrongNumArgs(interp, 2, objv, "window");
return TCL_ERROR;
}
- if (Tk_WindowId((Tk_Window) winPtr) == None) {
+ if (!Tk_WindowId((Tk_Window) winPtr)) {
Tk_MakeWindowExist((Tk_Window) winPtr);
}
hwnd = wmPtr->wrapper;
@@ -4023,9 +4023,9 @@ WmIconbitmapCmd(
string = Tcl_GetString(objv[objc-1]);
if (*string == '\0') {
- if (wmPtr->hints.icon_pixmap != None) {
+ if (wmPtr->hints.icon_pixmap) {
Tk_FreeBitmap(winPtr->display, wmPtr->hints.icon_pixmap);
- wmPtr->hints.icon_pixmap = None;
+ wmPtr->hints.icon_pixmap = 0;
}
wmPtr->hints.flags &= ~IconPixmapHint;
if (WinSetIcon(interp, NULL, (Tk_Window) useWinPtr) != TCL_OK) {
@@ -4078,7 +4078,7 @@ WmIconbitmapCmd(
Tcl_ResetResult(interp);
pixmap = Tk_GetBitmap(interp, (Tk_Window) winPtr, string);
- if (pixmap == None) {
+ if (!pixmap) {
return TCL_ERROR;
}
wmPtr->hints.icon_pixmap = pixmap;
@@ -4206,13 +4206,13 @@ WmIconmaskCmd(
}
argv3 = Tcl_GetString(objv[3]);
if (*argv3 == '\0') {
- if (wmPtr->hints.icon_mask != None) {
+ if (wmPtr->hints.icon_mask) {
Tk_FreeBitmap(winPtr->display, wmPtr->hints.icon_mask);
}
wmPtr->hints.flags &= ~IconMaskHint;
} else {
pixmap = Tk_GetBitmap(interp, tkwin, argv3);
- if (pixmap == None) {
+ if (!pixmap) {
return TCL_ERROR;
}
wmPtr->hints.icon_mask = pixmap;
@@ -6427,7 +6427,7 @@ Tk_GetRootCoords(
* If the window is mapped, let Windows figure out the translation.
*/
- if (winPtr->window != None) {
+ if (winPtr->window) {
HWND hwnd = Tk_GetHWND(winPtr->window);
POINT point;
@@ -6854,7 +6854,7 @@ TkWmRestackToplevel(
* (mapping it may give it a reparent window).
*/
- if (winPtr->window == None) {
+ if (!winPtr->window) {
Tk_MakeWindowExist((Tk_Window) winPtr);
}
if (winPtr->wmInfoPtr->flags & WM_NEVER_MAPPED) {
@@ -6864,7 +6864,7 @@ TkWmRestackToplevel(
? winPtr->wmInfoPtr->wrapper : Tk_GetHWND(winPtr->window);
if (otherPtr != NULL) {
- if (otherPtr->window == None) {
+ if (!otherPtr->window) {
Tk_MakeWindowExist((Tk_Window) otherPtr);
}
if (otherPtr->wmInfoPtr->flags & WM_NEVER_MAPPED) {
@@ -6915,7 +6915,7 @@ TkWmAddToColormapWindows(
TkWindow **oldPtr, **newPtr;
int count, i;
- if (winPtr->window == None) {
+ if (!winPtr->window) {
return;
}
@@ -7350,7 +7350,7 @@ GenerateConfigureNotify(
event.xconfigure.y = winPtr->changes.y;
event.xconfigure.width = winPtr->changes.width;
event.xconfigure.height = winPtr->changes.height;
- event.xconfigure.above = None;
+ event.xconfigure.above = 0;
Tk_QueueWindowEvent(&event, TCL_QUEUE_TAIL);
}
@@ -8623,7 +8623,7 @@ TkpWinToplevelDetachWindow(
SendMessage(wmPtr->wrapper, TK_DETACHWINDOW, 0, 0);
winPtr->flags &= ~TK_EMBEDDED;
winPtr->privatePtr = NULL;
- wmPtr->wrapper = None;
+ wmPtr->wrapper = 0;
if (state >= 0 && state <= 3) {
wmPtr->hints.initial_state = state;
}