Tk Source Code

Check-in [a283eb2a]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Fix [546607ffff]: Do not reset the cursor over a window not managed by Tk.

Tk_HWNDToWindow() returns NULL when the pointer is over a window which Tk does not own, for example a child window created by an extension. Tk_UpdatePointer() then called UpdateCursor(NULL), which fell through to TkpSetCursor(None) and loaded the default arrow cursor, so the 250 ms mouse timer kept overwriting the cursor set by the owner of that window.

Downloads: See separate download page
Timelines: family | ancestors | descendants | both | win-foreign-cursor
Files: files | file ages | folders
SHA3-256: a283eb2a520a23570a202befb04c3e506845c2a7c627f5653680ac0bf84cd3d3
User & Date: serhiy.storchaka 2026-09-23 21:55:27.492
Original Comment: Do not reset the cursor over a window not managed by Tk.

Tk_HWNDToWindow() returns NULL when the pointer is over a window which Tk does not own, for example a child window created by an extension. Tk_UpdatePointer() then called UpdateCursor(NULL), which fell through to TkpSetCursor(None) and loaded the default arrow cursor, so the 250 ms mouse timer kept overwriting the cursor set by the owner of that window. [Bug 546607]

Context
2026-10-23
14:28
Fix [546607ffff]: Do not reset the cursor over a window not managed by Tk check-in: e836917d user: jan.nijtmans tags: trunk, main
2026-09-23
21:55
Fix [546607ffff]: Do not reset the cursor over a window not managed by Tk.

Tk_HWNDToWindow() returns NULL when the pointer is over a window which Tk does not own, for example a child window created by an extension. Tk_UpdatePointer() then called UpdateCursor(NULL), which fell through to TkpSetCursor(None) and loaded the default arrow cursor, so the 250 ms mouse timer kept overwriting the cursor set by the owner of that window. closed check-in: a283eb2a user: serhiy.storchaka tags: win-foreign-cursor

10:33
Fix for [3de1b72157]: ttk::notebook takes the focus when clicked, even with the -takefocus 0 option. check-in: a695f427 user: csaba tags: trunk, main
Changes
Unified Diff Side-by-Side Diff Patch
Changes to generic/tkPointer.c.