diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2018-12-20 09:44:05 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2018-12-20 09:44:05 (GMT) |
commit | e26cd8eb2b04a4bd764e382cbcbfe4b1030796c6 (patch) | |
tree | 6bca925436edc8dce431cfd10502d50117b62d46 /win/tkWinX.c | |
parent | 0c4227b6cc6e9716ddd086a75e45c4e9373fa51b (diff) | |
parent | 81b0bd7641a9d2f63154c97d41c27bbb696ef674 (diff) | |
download | tk-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/tkWinX.c')
-rw-r--r-- | win/tkWinX.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/win/tkWinX.c b/win/tkWinX.c index a217108..661be57 100644 --- a/win/tkWinX.c +++ b/win/tkWinX.c @@ -522,10 +522,10 @@ TkWinDisplayChanged( screen->root_visual->bits_per_rgb = screen->root_depth; ReleaseDC(NULL, dc); - if (screen->cmap != None) { + if (screen->cmap) { XFreeColormap(display, screen->cmap); } - screen->cmap = XCreateColormap(display, None, screen->root_visual, + screen->cmap = XCreateColormap(display, 0, screen->root_visual, AllocNone); } @@ -585,7 +585,7 @@ TkpOpenDisplay( twdPtr = ckalloc(sizeof(TkWinDrawable)); if (twdPtr == NULL) { - return None; + return 0; } twdPtr->type = TWD_WINDOW; twdPtr->window.winPtr = NULL; @@ -598,7 +598,7 @@ TkpOpenDisplay( screen->white_pixel = RGB(255, 255, 255); screen->black_pixel = RGB(0, 0, 0); - screen->cmap = None; + screen->cmap = 0; display->screens = screen; display->nscreens = 1; @@ -655,10 +655,10 @@ TkpCloseDisplay( if (display->screens->root_visual != NULL) { ckfree(display->screens->root_visual); } - if (display->screens->root != None) { + if (display->screens->root) { ckfree(display->screens->root); } - if (display->screens->cmap != None) { + if (display->screens->cmap) { XFreeColormap(display, display->screens->cmap); } ckfree(display->screens); @@ -998,7 +998,7 @@ GenerateXEvent( } winPtr = (TkWindow *) Tk_HWNDToWindow(hwnd); - if (!winPtr || winPtr->window == None) { + if (!winPtr || !winPtr->window) { return; } @@ -1121,7 +1121,7 @@ GenerateXEvent( */ event.xbutton.root = RootWindow(winPtr->display, winPtr->screenNum); - event.xbutton.subwindow = None; + event.xbutton.subwindow = 0; event.xbutton.x = clientPoint.x; event.xbutton.y = clientPoint.y; event.xbutton.x_root = root.point.x; @@ -1623,7 +1623,7 @@ HandleIMEComposition( event.xkey.display = winPtr->display; event.xkey.window = winPtr->window; event.xkey.root = RootWindow(winPtr->display, winPtr->screenNum); - event.xkey.subwindow = None; + event.xkey.subwindow = 0; event.xkey.state = TkWinGetModifierState(); event.xkey.time = TkpGetMS(); event.xkey.same_screen = True; |