Tk Source Code

View Ticket
Login
Ticket UUID: 50fdbc36ad6f66009fe836daa92e6e765c5e9599
Title: Implement more X11 region functions on Windows and Aqua
Type: Patch Version: 9.1
Submitter: chrstphrchvz Created on: 2025-09-26 22:10:29
Subsystem: 82. X11 Emulation Assigned To: jan.nijtmans
Priority: 5 Medium Severity: Minor
Status: Closed Last Modified: 2025-10-31 11:07:59
Resolution: Fixed Closed By: jan.nijtmans
    Closed on: 2025-10-31 11:07:59
Description: (text/x-markdown)
These functions are easy to implement on Windows: `XEqualRegion()`, `XOffsetRegion()`, `XPointInRegion()`, `XUnionRegion()`, `XXorRegion()`

These functions are easy to implement on Aqua: `XPointInRegion()`, `XUnionRegion()`, `XXorRegion()`

For `XEqualRegion()` on Aqua, macOS does not have a corresponding public API, but a suboptimal implementation is possible using `HIShapeCreateXor()` and `HIShapeIsEmpty()`.

The functions `XXorRegion()` and `XEqualRegion()` do not already have reserved stub entries.

[Here](https://github.com/chrstphrchvz/tk/compare/9cb2bf8...c86b-x11region/) is what I attempted so far (based on core-8-6-branch).

For Windows, some implementations match those in [TkZinc’s replacement functions](https://github.com/asb-capfan/TkZinc/blob/main/win/WinPort.c).
User Comments: jan.nijtmans added on 2025-10-31 11:07:59: (text/x-fossil-wiki)
Fixed [481aff8c2bc48eb3|here]

Thanks for the report and your patch (based on 8.6). I used it as base for the Tk 9.1 fix. Since we generally don't add new stub entries in a minor release, it will only be available for Tk 9.1+

jan.nijtmans added on 2025-09-30 16:23:02: (text/x-fossil-wiki)
How about [https://core.tcl-lang.org/tk/timeline?r=bug-50fdbc36ad|this]?