diff options
-rw-r--r-- | generic/tkPointer.c | 6 | ||||
-rw-r--r-- | macosx/tkMacOSXColor.c | 2 | ||||
-rw-r--r-- | macosx/tkMacOSXDraw.c | 20 | ||||
-rw-r--r-- | macosx/tkMacOSXEvent.c | 2 | ||||
-rw-r--r-- | macosx/tkMacOSXImage.c | 8 | ||||
-rw-r--r-- | macosx/tkMacOSXSubwindows.c | 20 | ||||
-rw-r--r-- | macosx/tkMacOSXWm.c | 2 | ||||
-rw-r--r-- | macosx/tkMacOSXXStubs.c | 32 | ||||
-rw-r--r-- | win/stubs.c | 6 | ||||
-rw-r--r-- | win/tkWinDraw.c | 12 | ||||
-rw-r--r-- | win/tkWinFont.c | 4 | ||||
-rw-r--r-- | win/tkWinImage.c | 2 | ||||
-rw-r--r-- | win/tkWinMenu.c | 2 | ||||
-rw-r--r-- | win/tkWinPixmap.c | 6 | ||||
-rw-r--r-- | win/tkWinPointer.c | 6 | ||||
-rw-r--r-- | win/tkWinWindow.c | 30 | ||||
-rw-r--r-- | win/tkWinWm.c | 2 | ||||
-rw-r--r-- | win/tkWinX.c | 20 | ||||
-rw-r--r-- | xlib/xutil.c | 2 |
19 files changed, 92 insertions, 92 deletions
diff --git a/generic/tkPointer.c b/generic/tkPointer.c index 2fea8d8..2fbdedf 100644 --- a/generic/tkPointer.c +++ b/generic/tkPointer.c @@ -434,7 +434,7 @@ XGrabPointer( (void)cursor; (void)time; - display->request++; + LastKnownRequestProcessed(display)++; tsdPtr->grabWinPtr = (TkWindow *) Tk_IdToWindow(display, grab_window); tsdPtr->restrictWinPtr = NULL; TkpSetCapture(tsdPtr->grabWinPtr); @@ -470,7 +470,7 @@ XUngrabPointer( Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData)); (void)time; - display->request++; + LastKnownRequestProcessed(display)++; tsdPtr->grabWinPtr = NULL; tsdPtr->restrictWinPtr = NULL; TkpSetCapture(NULL); @@ -598,7 +598,7 @@ XDefineCursor( if (tsdPtr->cursorWinPtr == winPtr) { UpdateCursor(winPtr); } - display->request++; + LastKnownRequestProcessed(display)++; return Success; } diff --git a/macosx/tkMacOSXColor.c b/macosx/tkMacOSXColor.c index 0f16b11..e3a271c 100644 --- a/macosx/tkMacOSXColor.c +++ b/macosx/tkMacOSXColor.c @@ -755,7 +755,7 @@ XAllocColor( TCL_UNUSED(Colormap), /* Not used. */ XColor *colorPtr) /* XColor struct to modify. */ { - display->request++; + LastKnownRequestProcessed(display)++; colorPtr->pixel = TkpGetPixel(colorPtr); return 1; } diff --git a/macosx/tkMacOSXDraw.c b/macosx/tkMacOSXDraw.c index 69c0dc5..ea1615b 100644 --- a/macosx/tkMacOSXDraw.c +++ b/macosx/tkMacOSXDraw.c @@ -419,7 +419,7 @@ XDrawLines( return BadValue; } - display->request++; + LastKnownRequestProcessed(display)++; if (!TkMacOSXSetupDrawingContext(d, gc, &dc)) { return BadDrawable; } @@ -487,7 +487,7 @@ XDrawSegments( TkMacOSXDrawingContext dc; int i, lw = gc->line_width; - display->request++; + LastKnownRequestProcessed(display)++; if (!TkMacOSXSetupDrawingContext(d, gc, &dc)) { return BadDrawable; } @@ -539,7 +539,7 @@ XFillPolygon( TkMacOSXDrawingContext dc; int i; - display->request++; + LastKnownRequestProcessed(display)++; if (!TkMacOSXSetupDrawingContext(d, gc, &dc)) { return BadDrawable; } @@ -603,7 +603,7 @@ XDrawRectangle( return BadDrawable; } - display->request++; + LastKnownRequestProcessed(display)++; if (!TkMacOSXSetupDrawingContext(d, gc, &dc)) { return BadDrawable; } @@ -657,7 +657,7 @@ XDrawRectangles( XRectangle * rectPtr; int i, lw = gc->line_width; - display->request++; + LastKnownRequestProcessed(display)++; if (!TkMacOSXSetupDrawingContext(d, gc, &dc)) { return BadDrawable; } @@ -709,7 +709,7 @@ XFillRectangles( XRectangle * rectPtr; int i; - display->request++; + LastKnownRequestProcessed(display)++; if (!TkMacOSXSetupDrawingContext(d, gc, &dc)) { return BadDrawable; } @@ -814,7 +814,7 @@ XDrawArc( return BadDrawable; } - display->request++; + LastKnownRequestProcessed(display)++; if (!TkMacOSXSetupDrawingContext(d, gc, &dc)) { return BadDrawable; } @@ -884,7 +884,7 @@ XDrawArcs( XArc *arcPtr; int i, lw = gc->line_width; - display->request++; + LastKnownRequestProcessed(display)++; if (!TkMacOSXSetupDrawingContext(d, gc, &dc)) { return BadDrawable; } @@ -965,7 +965,7 @@ XFillArc( return BadDrawable; } - display->request++; + LastKnownRequestProcessed(display)++; if (!TkMacOSXSetupDrawingContext(d, gc, &dc)) { return BadDrawable; } @@ -1038,7 +1038,7 @@ XFillArcs( XArc * arcPtr; int i, lw = gc->line_width; - display->request++; + LastKnownRequestProcessed(display)++; if (!TkMacOSXSetupDrawingContext(d, gc, &dc)) { return BadDrawable; } diff --git a/macosx/tkMacOSXEvent.c b/macosx/tkMacOSXEvent.c index 08eb202..8af8faa 100644 --- a/macosx/tkMacOSXEvent.c +++ b/macosx/tkMacOSXEvent.c @@ -125,7 +125,7 @@ XSync( * [da5f2266df].) */ - display->request++; + LastKnownRequestProcessed(display)++; return 0; } diff --git a/macosx/tkMacOSXImage.c b/macosx/tkMacOSXImage.c index 38f6fe3..6becddb 100644 --- a/macosx/tkMacOSXImage.c +++ b/macosx/tkMacOSXImage.c @@ -402,7 +402,7 @@ XCreateImage( { XImage *ximage; - display->request++; + LastKnownRequestProcessed(display)++; ximage = (XImage *)ckalloc(sizeof(XImage)); ximage->height = height; @@ -507,7 +507,7 @@ TkMacOSXPutImage( MacDrawable *macDraw = (MacDrawable *)drawable; int result = Success; - display->request++; + LastKnownRequestProcessed(display)++; if (!TkMacOSXSetupDrawingContext(drawable, gc, &dc)) { return BadDrawable; } @@ -845,7 +845,7 @@ XCopyArea( CGImageRef img = NULL; CGRect bounds, srcRect, dstRect; - display->request++; + LastKnownRequestProcessed(display)++; if (!width || !height) { return BadDrawable; } @@ -919,7 +919,7 @@ XCopyPlane( MacDrawable *srcDraw = (MacDrawable *)src; MacDrawable *dstDraw = (MacDrawable *)dst; CGRect bounds, srcRect, dstRect; - display->request++; + LastKnownRequestProcessed(display)++; if (!width || !height) { /* TkMacOSXDbgMsg("Drawing of empty area requested"); */ return BadDrawable; diff --git a/macosx/tkMacOSXSubwindows.c b/macosx/tkMacOSXSubwindows.c index 5a16e23..49778ef 100644 --- a/macosx/tkMacOSXSubwindows.c +++ b/macosx/tkMacOSXSubwindows.c @@ -163,7 +163,7 @@ XMapWindow( TkMacOSXMakeRealWindowExist(macWin->toplevel->winPtr); } - display->request++; + LastKnownRequestProcessed(display)++; if (Tk_IsTopLevel(winPtr)) { if (!Tk_IsEmbedded(winPtr)) { TKContentView *view = [win contentView]; @@ -312,7 +312,7 @@ XUnmapWindow( if (!window) { return BadWindow; } - display->request++; + LastKnownRequestProcessed(display)++; if (Tk_IsTopLevel(winPtr)) { if (!Tk_IsEmbedded(winPtr) && winPtr->wmInfoPtr->hints.initial_state!=IconicState) { @@ -397,7 +397,7 @@ XResizeWindow( { MacDrawable *macWin = (MacDrawable *)window; - display->request++; + LastKnownRequestProcessed(display)++; if (Tk_IsTopLevel(macWin->winPtr) && !Tk_IsEmbedded(macWin->winPtr)) { TKWindow *w = (TKWindow *)macWin->winPtr->wmInfoPtr->window; @@ -446,7 +446,7 @@ XMoveResizeWindow( { MacDrawable *macWin = (MacDrawable *)window; - display->request++; + LastKnownRequestProcessed(display)++; if (Tk_IsTopLevel(macWin->winPtr) && !Tk_IsEmbedded(macWin->winPtr)) { NSWindow *w = macWin->winPtr->wmInfoPtr->window; @@ -499,7 +499,7 @@ XMoveWindow( { MacDrawable *macWin = (MacDrawable *)window; - display->request++; + LastKnownRequestProcessed(display)++; if (Tk_IsTopLevel(macWin->winPtr) && !Tk_IsEmbedded(macWin->winPtr)) { NSWindow *w = macWin->winPtr->wmInfoPtr->window; @@ -642,7 +642,7 @@ XRaiseWindow( { MacDrawable *macWin = (MacDrawable *)window; - display->request++; + LastKnownRequestProcessed(display)++; if (Tk_IsTopLevel(macWin->winPtr) && !Tk_IsEmbedded(macWin->winPtr)) { TkWmRestackToplevel(macWin->winPtr, Above, NULL); } else { @@ -676,7 +676,7 @@ XLowerWindow( { MacDrawable *macWin = (MacDrawable *)window; - display->request++; + LastKnownRequestProcessed(display)++; if (Tk_IsTopLevel(macWin->winPtr) && !Tk_IsEmbedded(macWin->winPtr)) { TkWmRestackToplevel(macWin->winPtr, Below, NULL); } else { @@ -715,7 +715,7 @@ XConfigureWindow( MacDrawable *macWin = (MacDrawable *)w; TkWindow *winPtr = macWin->winPtr; - display->request++; + LastKnownRequestProcessed(display)++; /* * Change the shape and/or position of the window. @@ -1432,7 +1432,7 @@ Tk_GetPixmap( MacDrawable *macPix; if (display != NULL) { - display->request++; + LastKnownRequestProcessed(display)++; } macPix = (MacDrawable *)ckalloc(sizeof(MacDrawable)); macPix->winPtr = NULL; @@ -1474,7 +1474,7 @@ Tk_FreePixmap( { MacDrawable *macPix = (MacDrawable *)pixmap; - display->request++; + LastKnownRequestProcessed(display)++; if (macPix->context) { char *data = (char *)CGBitmapContextGetData(macPix->context); diff --git a/macosx/tkMacOSXWm.c b/macosx/tkMacOSXWm.c index 272ff82..0ee307d 100644 --- a/macosx/tkMacOSXWm.c +++ b/macosx/tkMacOSXWm.c @@ -7264,7 +7264,7 @@ GetMaxSize( * of the window. */ { WmInfo *wmPtr = winPtr->wmInfoPtr; - NSRect *maxBounds = (NSRect*)(winPtr->display->screens->ext_data); + NSRect *maxBounds = (NSRect*)(ScreenOfDisplay(winPtr->display, 0)->ext_data); if (wmPtr->maxWidth > 0) { *maxWidthPtr = wmPtr->maxWidth; diff --git a/macosx/tkMacOSXXStubs.c b/macosx/tkMacOSXXStubs.c index cdf919f..ff520f2 100644 --- a/macosx/tkMacOSXXStubs.c +++ b/macosx/tkMacOSXXStubs.c @@ -79,10 +79,10 @@ TkMacOSXDisplayChanged( NSArray *nsScreens; - if (display == NULL || display->screens == NULL) { + if (display == NULL || (((_XPrivDisplay)(display))->screens) == NULL) { return; } - screen = display->screens; + screen = (((_XPrivDisplay)(display))->screens); nsScreens = [NSScreen screens]; if (nsScreens && [nsScreens count]) { @@ -232,7 +232,7 @@ XkbOpenDisplay( int *minor_rtrn, int *reason) { - Display *display = (Display *)ckalloc(sizeof(Display)); + _XPrivDisplay display = (_XPrivDisplay)ckalloc(sizeof(Display)); Screen *screen = (Screen *)ckalloc(sizeof(Screen)); int fd = 0; NSArray *cgVers; @@ -243,7 +243,7 @@ XkbOpenDisplay( bzero(screen, sizeof(Screen)); display->resource_alloc = MacXIdAlloc; - display->request = 0; + display->request = 1; display->qlen = 0; display->fd = fd; display->screens = screen; @@ -329,7 +329,7 @@ void TkpCloseDisplay( TkDisplay *displayPtr) { - Display *display = displayPtr->display; + _XPrivDisplay display = (_XPrivDisplay)displayPtr->display; if (gMacDisplay != displayPtr) { Tcl_Panic("TkpCloseDisplay: tried to call TkpCloseDisplay on bad display"); @@ -337,8 +337,8 @@ TkpCloseDisplay( gMacDisplay = NULL; if (display->screens != NULL) { - if (display->screens->root_visual != NULL) { - ckfree(display->screens->root_visual); + if (ScreenOfDisplay(display, 0)->root_visual != NULL) { + ckfree(ScreenOfDisplay(display, 0)->root_visual); } ckfree(display->screens); } @@ -455,7 +455,7 @@ XGetAtomName( Display *display, TCL_UNUSED(Atom)) { - display->request++; + LastKnownRequestProcessed(display)++; return NULL; } @@ -471,7 +471,7 @@ XRootWindow( Display *display, TCL_UNUSED(int)) { - display->request++; + LastKnownRequestProcessed(display)++; return ROOT_ID; } @@ -489,7 +489,7 @@ XGetGeometry( { TkWindow *winPtr = ((MacDrawable *)d)->winPtr; - display->request++; + LastKnownRequestProcessed(display)++; *root_return = ROOT_ID; if (winPtr) { *x_return = Tk_X(winPtr); @@ -803,7 +803,7 @@ XGetWindowProperty( unsigned long *bytes_after_return, TCL_UNUSED(unsigned char **)) { - display->request++; + LastKnownRequestProcessed(display)++; *actual_type_return = None; *actual_format_return = *bytes_after_return = 0; *nitems_return = 0; @@ -859,7 +859,7 @@ XSetIconName( /* * This is a no-op, no icon name for Macs. */ - display->request++; + LastKnownRequestProcessed(display)++; return Success; } @@ -874,7 +874,7 @@ XForceScreenSaver( * is! */ - display->request++; + LastKnownRequestProcessed(display)++; return Success; } @@ -1064,7 +1064,7 @@ XGetInputFocus( TCL_UNUSED(Window *), TCL_UNUSED(int *)) { - display->request++; + LastKnownRequestProcessed(display)++; return Success; } @@ -1080,7 +1080,7 @@ XSynchronize( Display *display, TCL_UNUSED(Bool)) { - display->request++; + LastKnownRequestProcessed(display)++; return NULL; } @@ -1103,7 +1103,7 @@ int XNoOp( Display *display) { - display->request++; + LastKnownRequestProcessed(display)++; return 0; } diff --git a/win/stubs.c b/win/stubs.c index faeac08..93a086e 100644 --- a/win/stubs.c +++ b/win/stubs.c @@ -579,7 +579,7 @@ int XNoOp( Display *display) { - display->request++; + LastKnownRequestProcessed(display)++; return 0; } @@ -590,7 +590,7 @@ XSynchronize( { (void)onoff; - display->request++; + LastKnownRequestProcessed(display)++; return NULL; } @@ -601,7 +601,7 @@ XSync( { (void)discard; - display->request++; + LastKnownRequestProcessed(display)++; return 0; } diff --git a/win/tkWinDraw.c b/win/tkWinDraw.c index 730af71..c2e2c25 100644 --- a/win/tkWinDraw.c +++ b/win/tkWinDraw.c @@ -369,7 +369,7 @@ XCopyPlane( HBRUSH bgBrush, fgBrush, oldBrush; TkpClipMask *clipPtr = (TkpClipMask*)gc->clip_mask; - display->request++; + LastKnownRequestProcessed(display)++; if (plane != 1) { Tcl_Panic("Unexpected plane specified for XCopyPlane"); @@ -520,7 +520,7 @@ TkPutImage( HBITMAP bitmap; char *data; - display->request++; + LastKnownRequestProcessed(display)++; dc = TkWinGetDrawableDC(display, d, &state); SetROP2(dc, tkpWinRopModes[gc->function]); @@ -1096,7 +1096,7 @@ XDrawArc( unsigned int width, unsigned int height, int start, int extent) { - display->request++; + LastKnownRequestProcessed(display)++; return DrawOrFillArc(display, d, gc, x, y, width, height, start, extent, 0); } @@ -1111,7 +1111,7 @@ XDrawArcs( { int ret = Success; - display->request++; + LastKnownRequestProcessed(display)++; while (narcs-- > 0) { ret = DrawOrFillArc(display, d, gc, arcs[0].x, arcs[0].y, @@ -1150,7 +1150,7 @@ XFillArc( unsigned int width, unsigned int height, int start, int extent) { - display->request++; + LastKnownRequestProcessed(display)++; return DrawOrFillArc(display, d, gc, x, y, width, height, start, extent, 1); } @@ -1165,7 +1165,7 @@ XFillArcs( { int ret = Success; - display->request++; + LastKnownRequestProcessed(display)++; while (narcs-- > 0) { ret = DrawOrFillArc(display, d, gc, arcs[0].x, arcs[0].y, diff --git a/win/tkWinFont.c b/win/tkWinFont.c index 1862989..5968146 100644 --- a/win/tkWinFont.c +++ b/win/tkWinFont.c @@ -1082,7 +1082,7 @@ Tk_DrawChars( TkWinDCState state; fontPtr = (WinFont *) gc->font; - display->request++; + LastKnownRequestProcessed(display)++; if (drawable == None) { return; @@ -1231,7 +1231,7 @@ TkDrawAngledChars( TkWinDCState state; fontPtr = (WinFont *) gc->font; - display->request++; + LastKnownRequestProcessed(display)++; if (drawable == None) { return; diff --git a/win/tkWinImage.c b/win/tkWinImage.c index fc48b95..e3054c6 100644 --- a/win/tkWinImage.c +++ b/win/tkWinImage.c @@ -589,7 +589,7 @@ XGetImage( XImage *imagePtr; HDC dc; - display->request++; + LastKnownRequestProcessed(display)++; if (twdPtr == NULL) { /* diff --git a/win/tkWinMenu.c b/win/tkWinMenu.c index bee43b7..fadd8ef 100644 --- a/win/tkWinMenu.c +++ b/win/tkWinMenu.c @@ -3188,7 +3188,7 @@ MenuSelectEvent( memset(&event, 0, sizeof(event)); event.virt.type = VirtualEvent; - event.virt.serial = menuPtr->display->request; + event.virt.serial = LastKnownRequestProcessed(menuPtr->display); event.virt.send_event = 0; event.virt.display = menuPtr->display; Tk_MakeWindowExist(menuPtr->tkwin); diff --git a/win/tkWinPixmap.c b/win/tkWinPixmap.c index d87fb34..0bba4c3 100644 --- a/win/tkWinPixmap.c +++ b/win/tkWinPixmap.c @@ -40,7 +40,7 @@ Tk_GetPixmap( int planes; Screen *screen; - display->request++; + LastKnownRequestProcessed(display)++; newTwdPtr = (TkWinDrawable *)ckalloc(sizeof(TkWinDrawable)); newTwdPtr->type = TWD_BITMAP; @@ -56,7 +56,7 @@ Tk_GetPixmap( } else { newTwdPtr->bitmap.colormap = twdPtr->bitmap.colormap; } - screen = &display->screens[0]; + screen = ScreenOfDisplay(display, 0); planes = 1; if (depth == screen->root_depth) { planes = PTR2INT(screen->ext_data); @@ -144,7 +144,7 @@ Tk_FreePixmap( { TkWinDrawable *twdPtr = (TkWinDrawable *) pixmap; - display->request++; + LastKnownRequestProcessed(display)++; if (twdPtr != NULL) { DeleteObject(twdPtr->bitmap.handle); ckfree(twdPtr); diff --git a/win/tkWinPointer.c b/win/tkWinPointer.c index bbffa44..200a868 100644 --- a/win/tkWinPointer.c +++ b/win/tkWinPointer.c @@ -339,7 +339,7 @@ XQueryPointer( (void)win_x_return; (void)win_y_return; - display->request++; + LastKnownRequestProcessed(display)++; TkGetPointerCoords(NULL, root_x_return, root_y_return); *mask_return = TkWinGetModifierState(); return True; @@ -476,7 +476,7 @@ XGetInputFocus( *focus_return = tkwin ? Tk_WindowId(tkwin) : 0; *revert_to_return = RevertToParent; - display->request++; + LastKnownRequestProcessed(display)++; return Success; } @@ -507,7 +507,7 @@ XSetInputFocus( (void)revert_to; (void)time; - display->request++; + LastKnownRequestProcessed(display)++; if (focus != None) { SetFocus(Tk_GetHWND(focus)); } diff --git a/win/tkWinWindow.c b/win/tkWinWindow.c index 54af4a4..8390ec0 100644 --- a/win/tkWinWindow.c +++ b/win/tkWinWindow.c @@ -306,7 +306,7 @@ XDestroyWindow( ThreadSpecificData *tsdPtr = (ThreadSpecificData *) Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData)); - display->request++; + LastKnownRequestProcessed(display)++; /* * Remove references to the window in the pointer module then release the @@ -358,7 +358,7 @@ XMapWindow( TkWindow *parentPtr; TkWindow *winPtr = TkWinGetWinPtr(w); - display->request++; + LastKnownRequestProcessed(display)++; ShowWindow(Tk_GetHWND(w), SW_SHOWNORMAL); winPtr->flags |= TK_MAPPED; @@ -381,7 +381,7 @@ XMapWindow( } } else { event.type = MapNotify; - event.xmap.serial = display->request; + event.xmap.serial = LastKnownRequestProcessed(display); event.xmap.send_event = False; event.xmap.display = display; event.xmap.event = winPtr->window; @@ -396,7 +396,7 @@ XMapWindow( */ event.type = VisibilityNotify; - event.xvisibility.serial = display->request; + event.xvisibility.serial = LastKnownRequestProcessed(display); event.xvisibility.send_event = False; event.xvisibility.display = display; event.xvisibility.window = winPtr->window; @@ -466,7 +466,7 @@ XUnmapWindow( XEvent event; TkWindow *winPtr = TkWinGetWinPtr(w); - display->request++; + LastKnownRequestProcessed(display)++; /* * Bug fix: Don't short circuit this routine based on TK_MAPPED because it @@ -478,7 +478,7 @@ XUnmapWindow( if (winPtr->flags & TK_WIN_MANAGED) { event.type = UnmapNotify; - event.xunmap.serial = display->request; + event.xunmap.serial = LastKnownRequestProcessed(display); event.xunmap.send_event = False; event.xunmap.display = display; event.xunmap.event = winPtr->window; @@ -512,7 +512,7 @@ XMoveResizeWindow( int x, int y, /* Position relative to parent. */ unsigned int width, unsigned int height) { - display->request++; + LastKnownRequestProcessed(display)++; MoveWindow(Tk_GetHWND(w), x, y, (int) width, (int) height, TRUE); return Success; } @@ -541,7 +541,7 @@ XMoveWindow( { TkWindow *winPtr = TkWinGetWinPtr(w); - display->request++; + LastKnownRequestProcessed(display)++; MoveWindow(Tk_GetHWND(w), x, y, winPtr->changes.width, winPtr->changes.height, TRUE); @@ -572,7 +572,7 @@ XResizeWindow( { TkWindow *winPtr = TkWinGetWinPtr(w); - display->request++; + LastKnownRequestProcessed(display)++; MoveWindow(Tk_GetHWND(w), winPtr->changes.x, winPtr->changes.y, (int)width, (int)height, TRUE); @@ -602,7 +602,7 @@ XRaiseWindow( { HWND window = Tk_GetHWND(w); - display->request++; + LastKnownRequestProcessed(display)++; SetWindowPos(window, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE); return Success; } @@ -614,7 +614,7 @@ XLowerWindow( { HWND window = Tk_GetHWND(w); - display->request++; + LastKnownRequestProcessed(display)++; SetWindowPos(window, HWND_BOTTOM, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE); return Success; } @@ -648,7 +648,7 @@ XConfigureWindow( TkWindow *winPtr = TkWinGetWinPtr(w); HWND hwnd = Tk_GetHWND(w); - display->request++; + LastKnownRequestProcessed(display)++; /* * Change the shape and/or position of the window. @@ -704,10 +704,10 @@ XClearWindow( HWND hwnd = Tk_GetHWND(w); HDC dc = GetDC(hwnd); - palette = TkWinGetPalette(display->screens[0].cmap); + palette = TkWinGetPalette(ScreenOfDisplay(display, 0)->cmap); oldPalette = SelectPalette(dc, palette, FALSE); - display->request++; + LastKnownRequestProcessed(display)++; winPtr = TkWinGetWinPtr(w); brush = CreateSolidBrush(winPtr->atts.background_pixel); @@ -832,7 +832,7 @@ TkpShowBusyWindow( window = Tk_WindowId(busyPtr->tkBusy); display = Tk_Display(busyPtr->tkBusy); hWnd = Tk_GetHWND(window); - display->request++; + LastKnownRequestProcessed(display)++; SetWindowPos(hWnd, HWND_TOP, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE); } diff --git a/win/tkWinWm.c b/win/tkWinWm.c index 46f332a..f772d1c 100644 --- a/win/tkWinWm.c +++ b/win/tkWinWm.c @@ -7257,7 +7257,7 @@ GenerateConfigureNotify( */ event.type = ConfigureNotify; - event.xconfigure.serial = winPtr->display->request; + event.xconfigure.serial = LastKnownRequestProcessed(winPtr->display); event.xconfigure.send_event = False; event.xconfigure.display = winPtr->display; event.xconfigure.event = winPtr->window; diff --git a/win/tkWinX.c b/win/tkWinX.c index db62d3e..0f6f48a 100644 --- a/win/tkWinX.c +++ b/win/tkWinX.c @@ -422,10 +422,10 @@ TkWinDisplayChanged( HDC dc; Screen *screen; - if (display == NULL || display->screens == NULL) { + if (display == NULL || (((_XPrivDisplay)(display))->screens) == NULL) { return; } - screen = display->screens; + screen = (((_XPrivDisplay)(display))->screens); dc = GetDC(NULL); screen->width = GetDeviceCaps(dc, HORZRES); @@ -559,7 +559,7 @@ XkbOpenDisplay( int *minor_rtrn, int *reason) { - Display *display = (Display *)ckalloc(sizeof(Display)); + _XPrivDisplay display = (_XPrivDisplay)ckalloc(sizeof(Display)); Screen *screen = (Screen *)ckalloc(sizeof(Screen)); TkWinDrawable *twdPtr = (TkWinDrawable *)ckalloc(sizeof(TkWinDrawable)); @@ -621,7 +621,7 @@ void TkpCloseDisplay( TkDisplay *dispPtr) { - Display *display = dispPtr->display; + _XPrivDisplay display = (_XPrivDisplay)dispPtr->display; ThreadSpecificData *tsdPtr = (ThreadSpecificData *) Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData)); @@ -636,14 +636,14 @@ TkpCloseDisplay( ckfree(display->display_name); } if (display->screens != NULL) { - if (display->screens->root_visual != NULL) { - ckfree(display->screens->root_visual); + if (ScreenOfDisplay(display, 0)->root_visual != NULL) { + ckfree(ScreenOfDisplay(display, 0)->root_visual); } - if (display->screens->root != None) { - ckfree((char *)display->screens->root); + if (ScreenOfDisplay(display, 0)->root != None) { + ckfree((char *)ScreenOfDisplay(display, 0)->root); } - if (display->screens->cmap != None) { - XFreeColormap(display, display->screens->cmap); + if (ScreenOfDisplay(display, 0)->cmap != None) { + XFreeColormap(display, ScreenOfDisplay(display, 0)->cmap); } ckfree(display->screens); } diff --git a/xlib/xutil.c b/xlib/xutil.c index a5f3b99..0760dc6 100644 --- a/xlib/xutil.c +++ b/xlib/xutil.c @@ -39,7 +39,7 @@ XInternAtom( (void)atom_name; (void)only_if_exists; - display->request++; + LastKnownRequestProcessed(display)++; return ++atom; } |