Tk Source Code

View Ticket
Login
Ticket UUID: 08eb057dea7a5c0f205de5ac844b9d069ff7fcce
Title: Aqua: cleanup Carbon-era cursor variables
Type: Patch Version: 8.6.10
Submitter: chrstphrchvz Created on: 2020-07-16 15:07:37
Subsystem: 31. Cursor Names Assigned To: marc_culler
Priority: 5 Medium Severity: Cosmetic
Status: Closed Last Modified: 2021-03-03 11:23:23
Resolution: Fixed Closed By: chrstphrchvz
    Closed on: 2021-03-03 11:23:23
Description:

I am investigating an issue in the panedwindow cursor which I have yet to report (update: others reported it, see [ac7f771957]). In the meantime, I suggest some cleanup of variables unused since Tk Carbon. See attached patch for a rough idea.

User Comments: jan.nijtmans added on 2020-08-26 10:48:11:

Thinking about it, I'm reluctant to do such a cleanup in Tk 8.6: It might be that there is still some Tcl plugin around based on Tcl/Tk 8.6, which uses those functions. Since NSAPI isn't supported any more in any browser, no problem to remove NSAPI support altogether in Tcl/Tk 8.7. That's even much more cleanup!

So, I merged this now to Tk 8.7, with some additional NSAPI-related cleanup.

See: [bbac572382a10097]


jan.nijtmans added on 2020-08-26 07:46:24:

Actually, those functions don't date back to Carbon, they date back to the Tcl Plugin. However, no browser nowadays support NPAPI any more, so this plugin is actually obsolate.

Since Tk_MacOSXTkOwnsCursor() is in the public stub table, I wouldn't remove this function in a patch release, but no problem for Tk 8.7.

The duplicate stub entries are meant for a future stub simplification, in which all stub entries have a platform-independant number. No big deal, but it's unnecessary to do this for functions which are unused anyway. Thanks for noting this, that means some more simplifications.


marc_culler (claiming to be Marc Culler) added on 2020-08-25 16:30:05:

I created a bugfix branch bug-08eb057dea which deals with this and pushed commit 6a03af539c

Before I merge, though, I have a question. In tkstubs.decls the stubs 0-5 are the same as stubs 11-16 except that the names in the second group end in an underscore. Why???

Also the function TkMacOSXGetDrawablePort is never called and does nothing except return a NULL pointer. Similarly TkMacOSXGetRootControl is an alias for TkMacOSXDrawableView and is never called. Can we get rid of those, too? They are #7 and #8 in tk.decls.


jan.nijtmans added on 2020-08-24 06:31:44:

Sure, TkMacOSXInstallCursor can be removed from the stub table. It's an internal platform-specific API only. We have the habit only doing this in patch releases, but that's easy to work around. Not really a bit issue.


marc_culler (claiming to be Marc Culler) added on 2020-08-19 18:22:04:
I would say that TkMacOSXInstallCursor does not belong in the stubs table.
It is just a helper function for TkpSetCursor and should be declared static.
If it were static, we would just change its signature.

Is there some reason why it cannot be removed from the stubs table and made
static?

bll added on 2020-07-16 20:34:43:
Paned window seems to have the correct cursor (attached image), but the sash
seems to be really narrow.  And I'm not sure how to make it visible on aqua.

bll added on 2020-07-16 20:27:58:
If you are playing with cursors, I have this patch.

--- /home/bll/t/tcl8610a/tk8.6.10a/library/ttk/cursors.tcl      2020-07-16 08:22:07.693211887 -0700
+++ /home/bll/t/tcl8610awork/tk8.6.10a/library/ttk/cursors.tcl  2020-07-16 08:54:38.716192685 -0700
@@ -115,6 +115,10 @@
                    sresize     resizedown
                    wresize     resizeleft
                    eresize     resizeright
+nwresize resizetopleft
+neresize resizetopright
+swresize resizebottomleft
+seresize resizebottomright
                }
            }
        }

chrstphrchvz added on 2020-07-16 19:55:51:

Now attaching a second patch no-tkOwnsCursor.diff (to apply after no-resizeOverride.diff)


Attachments: