| Description: |
OriginalBugID: 1252 RFE
Version: 8.0.4
SubmitDate: '1999-02-22'
LastModified: '1999-08-31'
Severity: LOW
Status: Closed
Submitter: welch
ChangedBy: hobbs
RelatedBugIDs: 1350
OS: Windows NT
OSVersion: 4, SP3
Machine: X86
ClosedDate: '1999-08-31'
Name:
David Ascher
Extensions:
None
CustomShell:
Patch to tkWinCursor, no backwards-incompatible changes. Only added new functionality on Win32
ReproducibleScript:
As documented in the Tk doc, custom cursors don't work on Win32.
ObservedBehavior:
Custom cursors don't work on Win32 -- one is limited to the system cursors.
DesiredBehavior:
Behavior similar on win32 as on X.
Patch:
--- tkWinCursor.c.oldWed Jan 13 13:28:21 1999
+++ tkWinCursor.c.newWed Jan 13 13:51:26 1999
@@ -109,6 +109,29 @@
cursorPtr->winCursor = LoadCursor(Tk_GetHINSTANCE(), string);
cursorPtr->system = 0;
}
+#ifdef WINDOWS_CURSOR_FILES
+ if (string[0] == '@') {
+ int argc;
+ char **argv = NULL;
+ if (Tcl_SplitList(interp, string, &argc, &argv) != TCL_OK) {
+ return NULL;
+ }
+ if ((argc != 1) || (argv[0][0] != '@')) {
+ ckfree((char *)cursorPtr);
+ Tcl_AppendResult(interp, "bad cursor spec \"", string, "\"",
+ (char *) NULL);
+ return NULL;
+ }
+ if (Tcl_IsSafe(interp)) {
+ Tcl_AppendResult(interp, "can't get cursor from a file in",
+ " a safe interpreter", (char *) NULL);
+ ckfree((char *)cursorPtr);
+ return NULL;
+ }
+ cursorPtr->winCursor = LoadCursorFromFile(&(argv[0][1]));
+ cursorPtr->system = 0;
+ }
+#endif
if (cursorPtr->winCursor == NULL) {
ckfree((char *)cursorPtr);
Tcl_AppendResult(interp, "bad cursor spec \"", string, "\"",
PatchFiles:
tkWinCursor.c
This adds support for .CUR and .ANI cursors.
I believe I've submitted this patch before, but it never showed up anywhere, nor did I get an ack. Please acknowledge receipt.
|