diff options
author | culler <culler> | 2024-05-19 21:07:21 (GMT) |
---|---|---|
committer | culler <culler> | 2024-05-19 21:07:21 (GMT) |
commit | 7312614099fe545740036db6a632e1cdebc04e88 (patch) | |
tree | 87cac438c0983b01c66fd25b8e18766f7a777ea2 /macosx | |
parent | ece7371623efd99ee6863545f2627a91806ea840 (diff) | |
download | tk-7312614099fe545740036db6a632e1cdebc04e88.zip tk-7312614099fe545740036db6a632e1cdebc04e88.tar.gz tk-7312614099fe545740036db6a632e1cdebc04e88.tar.bz2 |
All event-9.xy tests now pass, but 9.13 fails one time out of five.
Diffstat (limited to 'macosx')
-rw-r--r-- | macosx/tkMacOSXWindowEvent.c | 20 | ||||
-rw-r--r-- | macosx/tkMacOSXWm.c | 10 |
2 files changed, 14 insertions, 16 deletions
diff --git a/macosx/tkMacOSXWindowEvent.c b/macosx/tkMacOSXWindowEvent.c index 4e40bb6..41c9ede 100644 --- a/macosx/tkMacOSXWindowEvent.c +++ b/macosx/tkMacOSXWindowEvent.c @@ -74,8 +74,6 @@ extern NSString *NSWindowDidOrderOffScreenNotification; NSView *view = [w contentView]; NSPoint viewLocation = [view convertPoint:location fromView:nil]; if (NSPointInRect(viewLocation, NSInsetRect([view bounds], 2, 2))) { - fprintf(stderr, "windowActivation calling TkUpdatePointer\n"); - fflush(stderr); Tk_UpdatePointer((Tk_Window) winPtr, x, y, [NSApp tkButtonState]); } } @@ -252,15 +250,15 @@ extern NSString *NSWindowDidOrderOffScreenNotification; } } -- (void) windowMapped: (NSNotification *) notification -{ - NSWindow *w = [notification object]; - TkWindow *winPtr = TkMacOSXGetTkWindow(w); +//- (void) windowMapped: (NSNotification *) notification +//{ +// NSWindow *w = [notification object]; +// TkWindow *winPtr = TkMacOSXGetTkWindow(w); - if (winPtr) { - while (Tcl_DoOneEvent(TCL_IDLE_EVENTS)) {} - } -} +// if (winPtr) { +// while (Tcl_DoOneEvent(TCL_IDLE_EVENTS)) {} +// } +//} - (void) windowLiveResize: (NSNotification *) notification { @@ -306,7 +304,7 @@ extern NSString *NSWindowDidOrderOffScreenNotification; observe(NSWindowDidResizeNotification, windowBoundsChanged:); observe(NSWindowDidDeminiaturizeNotification, windowExpanded:); observe(NSWindowDidMiniaturizeNotification, windowCollapsed:); - observe(NSWindowWillOrderOnScreenNotification, windowMapped:); + //observe(NSWindowWillOrderOnScreenNotification, windowMapped:); observe(NSWindowDidOrderOnScreenNotification, windowBecameVisible:); observe(NSWindowWillStartLiveResizeNotification, windowLiveResize:); observe(NSWindowDidEndLiveResizeNotification, windowLiveResize:); diff --git a/macosx/tkMacOSXWm.c b/macosx/tkMacOSXWm.c index 952da39..c771ec3 100644 --- a/macosx/tkMacOSXWm.c +++ b/macosx/tkMacOSXWm.c @@ -897,12 +897,15 @@ TkWmUnmapWindow( * * This procedure is invoked when a top-level window is about to be * deleted. It cleans up the wm-related data structures for the window. + * If the dead window contains the pointer, TkUpdatePointer is called + * to tell Tk which window will be the new pointer window. * * Results: * None. * * Side effects: - * The WmInfo structure for winPtr gets freed up. + * The WmInfo structure for winPtr gets freed. Tk's cached pointer + * window may change. * *---------------------------------------------------------------------- */ @@ -913,9 +916,6 @@ TkWmDeadWindow( { TkWindow *winPtr2; WmInfo *wmPtr = winPtr->wmInfoPtr, *wmPtr2; - if (wmPtr == NULL) { - return; - } TKWindow *deadNSWindow = (TKWindow *)TkMacOSXGetNSWindowForDrawable( Tk_WindowId(winPtr)); if (deadNSWindow == NULL) { @@ -2037,7 +2037,7 @@ WmForgetCmd( macWin->toplevel->referenceCount++; macWin->flags &= ~TK_HOST_EXISTS; - TkWmDeadWindow(winPtr); + //TkWmDeadWindow(winPtr); RemapWindows(winPtr, (MacDrawable *)winPtr->parentPtr->window); /* |