Tk Source Code

View Ticket
Login
Ticket UUID: 776646
Title: cursor incompatabilities
Type: Bug Version: None
Submitter: patthoyts Created on: 2003-07-24 01:18:43
Subsystem: 31. Cursor Names Assigned To: patthoyts
Priority: 5 Medium Severity:
Status: Closed Last Modified: 2026-10-22 17:22:37
Resolution: Fixed Closed By: serhiy.storchaka
    Closed on: 2026-09-28 15:50:11
Description:
Originally submitted as a Tcl FR by rox - moved to Tk.

 the native pointer in X is "left_ptr" and in windows is
"arrow". i suggest remapping the cursors so that arrow
is the native pointer on all platforms

the fleur/move cursor does not have the native
appearance in windows

there is no native hand (hyperlink) cursor spec in
windows. it should be easy to add a mapping for hand2
to IDC_HAND.

the documentation says the "size" cursor is available
in windows but i got an error when trying to use it in
my 8.4.2 tclkit.

all X cursors are available under windows as tk has
them built in. however the windows cursors are not
available on other platforms which can cause errors. i
would suggest mapping the windows cursor names to their
similar X names when running in X.
User Comments: serhiy.storchaka added on 2026-09-28 15:50:11:

The bugs with the hand2, size and fleur cursors on Windows were fixed long ago. The Windows-only cursor names (no, size_ns, wait, etc.) are still not available on X11, as documented in cursors.n.

Portable cursor names mapped to the native cursors of every platform are provided by ttk::cursor (standard, text, link, busy, forbidden, move, hresize, vresize, etc.), but it is not documented, see [835e5e17ec].


patthoyts added on 2004-01-29 06:25:28:
Logged In: YES 
user_id=202636

Backported the Windows cursor changes from Tk 8.5 to 8.4 branch.

patthoyts added on 2003-07-24 09:14:30:
Logged In: YES 
user_id=202636

Committed fixes for the hand2 cursor and to fix the size and
fleur cursors. I've also added tests to ensure than all the
documented cursors are actually available for each platform.

I think that for portability Tk apps should restrict
themselves to the unix defined set of cursors. I'll leave
this open for a bit for comments about the default cursor
name and if the same set of names should be available
everywhere.

patthoyts added on 2003-07-24 08:22:55:
Logged In: YES 
user_id=202636

The hand cursor can be implemented by defining hand to match
IDC_HAND. This token isn't defined unless WINVER >= 0x0500
but I've found that we can set the resource manually and if
it isn't found at runtime, then we will default to the Tk
unix-style hand cursor.

The IDC_SIZE cursor is documented as depreciated and we
should be using IDC_SIZEALL. This deals with the fleur and
size cursor problems listed above.