diff options
-rw-r--r-- | generic/tkGrab.c | 15 | ||||
-rw-r--r-- | generic/tkPointer.c | 4 | ||||
-rw-r--r-- | generic/tkWindow.c | 14 | ||||
-rw-r--r-- | macosx/tkMacOSXMouseEvent.c | 15 | ||||
-rw-r--r-- | macosx/tkMacOSXSubwindows.c | 1 | ||||
-rw-r--r-- | macosx/tkMacOSXWm.c | 5 |
6 files changed, 0 insertions, 54 deletions
diff --git a/generic/tkGrab.c b/generic/tkGrab.c index c5f2a3b..c8e5253 100644 --- a/generic/tkGrab.c +++ b/generic/tkGrab.c @@ -998,10 +998,6 @@ TkInOutEvents( { TkWindow *winPtr; int upLevels, downLevels, i, j, focus; - //fprintf(stderr, "TkInOutEvents: source is %s, destination is %s, leaveType is %d, enterType is %d\n", - // sourcePtr ? Tk_PathName(sourcePtr) : "NULL", - // destPtr ? Tk_PathName(destPtr) : "NULL", - // leaveType, enterType); /* * There are four possible cases to deal with: @@ -1029,7 +1025,6 @@ TkInOutEvents( focus = 0; } FindCommonAncestor(sourcePtr, destPtr, &upLevels, &downLevels); - //fprintf(stderr, "upLevels = %d, downLevels = %d\n", upLevels, downLevels); /* * Generate enter/leave events and add them to the grab event queue. @@ -1088,15 +1083,10 @@ TkInOutEvents( * Non-linear: neither window is an inferior of the other. */ - //fprintf(stderr, " Nonlinear path\n"); if (leaveType != 0) { - //fprintf(stderr, " Queueing leave event for %s\n", - // Tk_PathName(sourcePtr)); QUEUE(sourcePtr, leaveType, NotifyNonlinear); for (winPtr = sourcePtr->parentPtr, i = upLevels-1; i > 0; winPtr = winPtr->parentPtr, i--) { - //fprintf(stderr, " Queueing Virtual leave event for %s\n", - // Tk_PathName(winPtr)); QUEUE(winPtr, leaveType, NotifyNonlinearVirtual); } } @@ -1105,18 +1095,13 @@ TkInOutEvents( for (winPtr = destPtr->parentPtr, j = 1; j < i; winPtr = winPtr->parentPtr, j++) { } - //fprintf(stderr, " Queueing Virtual enter event for %s\n", - // Tk_PathName(winPtr)); QUEUE(winPtr, enterType, NotifyNonlinearVirtual); } if (destPtr != NULL) { - //fprintf(stderr, " Queueing enter event for %s\n", - // Tk_PathName(destPtr)); QUEUE(destPtr, enterType, NotifyNonlinear); } } } - fflush(stderr); } /* diff --git a/generic/tkPointer.c b/generic/tkPointer.c index 2b5b40e..ae3bef9 100644 --- a/generic/tkPointer.c +++ b/generic/tkPointer.c @@ -227,10 +227,6 @@ Tk_UpdatePointer( unsigned changes = (state ^ tsdPtr->lastState) & ALL_BUTTONS; int type, b; unsigned mask; - //fprintf(stderr, " Tk_UpdatePointer: %s %d %d %x --> %s %d %d %x\n", - // tsdPtr->lastWinPtr ? Tk_PathName(tsdPtr->lastWinPtr): "NULL", - // tsdPtr->lastPos.x, tsdPtr->lastPos.y, tsdPtr->lastState, - // tkwin ? Tk_PathName(tkwin) : "NULL", x, y, state); pos.x = x; pos.y = y; diff --git a/generic/tkWindow.c b/generic/tkWindow.c index 5c3700b..3703d36 100644 --- a/generic/tkWindow.c +++ b/generic/tkWindow.c @@ -1334,19 +1334,11 @@ static void SendEnterLeaveForDestroy( XQueryPointer(NULL, None, NULL, NULL, &x, &y, NULL, NULL, &state); pointerWin = Tk_CoordsToWindow(x, y, tkwin); if (pointerWin == tkwin) { - //fprintf(stderr, " Pointer window is being destroyed\n"); if (!Tk_IsTopLevel(tkwin)) { containerPtr = TkGetContainer((TkWindow *)pointerWin); - //fprintf(stderr, " Moving pointer from topmost %s to container %s\n", - // pointerWin ? Tk_PathName(pointerWin) : "NULL", - // containerPtr ? Tk_PathName(containerPtr) : "NULL"); Tk_UpdatePointer((Tk_Window) containerPtr, x, y, state); } - // else { - //fprintf(stderr, " Pointer window is a toplevel\n"); - // } } - // fflush(stderr); } void @@ -1368,8 +1360,6 @@ Tk_DestroyWindow( return; } - //fprintf(stderr, "Tk_DestroyWindow: destroying %s\n", Tk_PathName(tkwin)); - //fflush(stderr); SendEnterLeaveForDestroy(tkwin); winPtr->flags |= TK_ALREADY_DEAD; @@ -1752,8 +1742,6 @@ static void SendEnterLeaveForMap( XQueryPointer(NULL, None, NULL, NULL, &x, &y, NULL, NULL, &state); pointerWin = Tk_CoordsToWindow(x, y, tkwin); if (pointerWin == tkwin) { - //fprintf(stderr, " New window contains pointer.\n"); - //fflush(stderr); Tk_UpdatePointer(tkwin, x, y, state); } } @@ -1798,8 +1786,6 @@ Tk_MapWindow( event.xmap.window = winPtr->window; event.xmap.override_redirect = winPtr->atts.override_redirect; Tk_HandleEvent(&event); - //fprintf(stderr, "Tk_MapWindow: mapped %s\n", Tk_PathName(tkwin)); - //fflush(stderr); SendEnterLeaveForMap(tkwin); } diff --git a/macosx/tkMacOSXMouseEvent.c b/macosx/tkMacOSXMouseEvent.c index 8d94300..f942485 100644 --- a/macosx/tkMacOSXMouseEvent.c +++ b/macosx/tkMacOSXMouseEvent.c @@ -199,7 +199,6 @@ enum { int fakeState = [NSApp tkButtonState] & ~TkGetButtonMask(Button1); int x = location.x; int y = floor(TkMacOSXZeroScreenHeight() - location.y); - //fprintf(stderr, "(1) calling Tk_UpdatePointer)\n"); fflush(stderr); Tk_UpdatePointer((Tk_Window) [NSApp tkEventTarget], x, y, fakeState); } @@ -501,31 +500,19 @@ enum { state |= TkGetButtonMask(Button1); } if (eventType == NSMouseEntered) { - //fprintf(stderr, "handling NSMouseEntered for %s\n", - //Tk_PathName([NSApp tkPointerWindow])); - //fflush(stderr); Tk_Window new_win = Tk_CoordsToWindow(global.x, global.y, (Tk_Window) [NSApp tkPointerWindow]); - // WHEN SHOULD THIS CALL HAPPEN? - // It only happens for toplevels, but can happen when a window is - // deiconified, in which case the highest Tk window containing the - // mouse should be the target. - //fprintf(stderr, "(2) calling Tk_UpdatePointer)\n"); fflush(stderr); Tk_UpdatePointer(new_win, global.x, global.y, state); } else if (eventType == NSMouseExited) { - //fprintf(stderr, "handling NSMouseExited\n"); fflush(stderr); if ([NSApp tkDragTarget]) { - //fprintf(stderr, "(3) calling Tk_UpdatePointer)\n"); fflush(stderr); Tk_UpdatePointer((Tk_Window) [NSApp tkDragTarget], global.x, global.y, state); } else { - //fprintf(stderr, "(4) calling Tk_UpdatePointer)\n"); fflush(stderr); Tk_UpdatePointer(NULL, global.x, global.y, state); } } else if (eventType == NSMouseMoved || eventType == NSLeftMouseDragged) { if ([NSApp tkPointerWindow]) { - //fprintf(stderr, "(5) calling Tk_UpdatePointer)\n"); fflush(stderr); Tk_UpdatePointer(target, global.x, global.y, state); } else { XEvent xEvent = {0}; @@ -550,7 +537,6 @@ enum { } } else { - //fprintf(stderr, "(6) calling Tk_UpdatePointer)\n"); fflush(stderr); Tk_UpdatePointer(target, global.x, global.y, state); } } else { @@ -840,7 +826,6 @@ GenerateButtonEvent( tkwin = Tk_TopCoordsToWindow(tkwin, medPtr->local.h, medPtr->local.v, &dummy, &dummy); } - //fprintf(stderr, "(7) calling Tk_UpdatePointer)\n"); fflush(stderr); Tk_UpdatePointer(tkwin, medPtr->global.h, medPtr->global.v, medPtr->state); return true; } diff --git a/macosx/tkMacOSXSubwindows.c b/macosx/tkMacOSXSubwindows.c index 732ed1d..fb71a0c 100644 --- a/macosx/tkMacOSXSubwindows.c +++ b/macosx/tkMacOSXSubwindows.c @@ -197,7 +197,6 @@ XMapWindow( NSPoint viewLocation = [view convertPoint:mouse fromView:nil]; if (NSPointInRect(viewLocation, NSInsetRect([view bounds], 2, 2))) { - fprintf(stderr, "XMapWindow: calling Tk_UpdatePointer\n"); Tk_UpdatePointer((Tk_Window) winPtr, x, y, [NSApp tkButtonState]); } } else { diff --git a/macosx/tkMacOSXWm.c b/macosx/tkMacOSXWm.c index 1ada289..952da39 100644 --- a/macosx/tkMacOSXWm.c +++ b/macosx/tkMacOSXWm.c @@ -918,7 +918,6 @@ TkWmDeadWindow( } TKWindow *deadNSWindow = (TKWindow *)TkMacOSXGetNSWindowForDrawable( Tk_WindowId(winPtr)); - //fprintf(stderr, "TkWmDeadWindow: will destroy %s\n", Tk_PathName(winPtr)); if (deadNSWindow == NULL) { return; } @@ -998,7 +997,6 @@ TkWmDeadWindow( NSPoint mouse = [NSEvent mouseLocation]; NSWindow *w; [NSApp setTkPointerWindow:nil]; - //fprintf(stderr, " Looking for new pointer window\n"); winPtr2 = NULL; for (w in [NSApp orderedWindows]) { @@ -1027,11 +1025,8 @@ TkWmDeadWindow( root_y = floor(TkMacOSXZeroScreenHeight() - mouse.y); int win_x, win_y; Tk_Window target = Tk_TopCoordsToWindow((Tk_Window) winPtr2, top_x, top_y, &win_x, &win_y); - //fprintf(stderr, " new mouseWindow is %s\n", - // target ? Tk_PathName(target) : "NULL"); Tk_UpdatePointer((Tk_Window) target, root_x, root_y, [NSApp tkButtonState]); } -// fflush(stderr); /* * Unregister the NSWindow and remove all references to it from the Tk |