diff options
author | culler <culler> | 2024-05-22 02:44:54 (GMT) |
---|---|---|
committer | culler <culler> | 2024-05-22 02:44:54 (GMT) |
commit | ec44aa0c277d6c671ec0024785197e2f2619993a (patch) | |
tree | 30f5bf5bf97e6ad109dfa83a58a46f58b0f6e473 /win | |
parent | e4fbaea258605ad01892f783375433c8bf613270 (diff) | |
download | tk-ec44aa0c277d6c671ec0024785197e2f2619993a.zip tk-ec44aa0c277d6c671ec0024785197e2f2619993a.tar.gz tk-ec44aa0c277d6c671ec0024785197e2f2619993a.tar.bz2 |
All event tests now pass on Windows
Diffstat (limited to 'win')
-rw-r--r-- | win/tkWinWm.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/win/tkWinWm.c b/win/tkWinWm.c index 146b82b..a550302 100644 --- a/win/tkWinWm.c +++ b/win/tkWinWm.c @@ -2585,20 +2585,18 @@ static void CheckForPointer(TkWindow *winPtr) TkWindow **windows = TkWmStackorderToplevel(winPtr->mainPtr->winPtr); TkWindow **w; TkGetPointerCoords(NULL, &mouse.x, &mouse.y); - fprintf(stderr, "CheckForPointer: %s with mouse @(%d, %d)\n", - Tk_PathName(winPtr), mouse.x, mouse.y); if (windows != NULL) { for (w = windows; *w ; w++) { RECT windowRect; HWND hwnd = Tk_GetHWND(Tk_WindowId((Tk_Window) *w)); - fprintf(stderr, " Checking %s\n", Tk_PathName(*w)); if (GetWindowRect(hwnd, &windowRect) == 0) { continue; } if (winPtr != *w && PtInRect(&windowRect, mouse)) { - fprintf(stderr, "Pointer is in %s. Calling Tk_UpdatePointer\n", - Tk_PathName(*w)); - Tk_UpdatePointer((Tk_Window) *w, mouse.x, mouse.y, state); + Tk_Window target = Tk_CoordsToWindow(mouse.x, mouse.y, + (Tk_Window) *w); + Tk_UpdatePointer((Tk_Window) target, + mouse.x, mouse.y, state); break; } } @@ -6710,8 +6708,6 @@ TkWmStackorderToplevelEnumProc( TkWmStackorderToplevelPair *pair = (TkWmStackorderToplevelPair *) lParam; - /*fprintf(stderr, "Looking up HWND %d\n", hwnd);*/ - hPtr = Tcl_FindHashEntry(pair->table, (char *) hwnd); if (hPtr != NULL) { childWinPtr = (TkWindow *)Tcl_GetHashValue(hPtr); |