| Ticket UUID: | f9eddb541a3710dc3dfd3867666b91a3f4d7f8a6 | |||
| Title: | Improve TkSetRegion(); implement XSetClipRectangles() on Windows and improve it | |||
| Type: | Patch | Version: | 8.6.13 | |
| Submitter: | chrstphrchvz | Created on: | 2023-07-16 12:02:35 | |
| Subsystem: | 82. X11 Emulation | Assigned To: | fvogel | |
| Priority: | 5 Medium | Severity: | Minor | |
| Status: | Closed | Last Modified: | 2023-07-17 20:40:26 | |
| Resolution: | Fixed | Closed By: | nab | |
| Closed on: | 2023-07-17 20:40:26 | |||
| Description: |
Here is a series of patches to consider:
| |||
| User Comments: |
nab added on 2023-07-17 20:40:26:
tested on windows (Tk compiled thanks to clang.exe) and it works very fine. many thanks. ++ fvogel added on 2023-07-17 20:01:59: Merged in core-8-6-branch and upwards. Many thanks to Christopher, once more! Also: I have committed your proposal for a "smoke test" and have checked it builds on all the three platforms, plus it works: the labelframe text gets correctly clipped. This is indeed a smoke test, and it also provides an example of use of XSetClipRectangles() live in the Tk code, so I thought this patch would be useful in these two respects. nab added on 2023-07-17 17:13:56: cool. thanks François. ++ fvogel added on 2023-07-17 17:11:53: Like: in a few hours. fvogel added on 2023-07-17 17:10:07: Soon. nab added on 2023-07-17 16:27:43: Hi, do you plan to merge this branch trunk soon or in a week? best regards, Nicolas jan.nijtmans added on 2023-07-17 07:08:43: I'm OK putting this in 8.6 chrstphrchvz added on 2023-07-17 06:31:01: Well, this is not for a new feature. This is for fixing a cross-platform inconsistency. Extensions such as TkTable currently have any usage of XSetClipRectangles() disabled on Windows. They would be unaffected by this function suddenly becoming available, and would have to be patched and rebuilt to use this function. Is it not okay to make this function available for Windows in 8.6.14, when it was made available for Aqua in 8.6.11? fvogel added on 2023-07-16 17:31:24: Aside from the testing, some questions I have: can this be put in 8.6? or is 8.7 a better place? New features normally go in 8.7, that's one answer. Another answer could stem from the question: does the patch have an impact on binary compatibility as seen from extensions? chrstphrchvz added on 2023-07-16 17:18:43: I tested XSetClipRectangles() on Windows and Aqua using the revised text widget as of [11905189f8]. If there should at least be “smoke test” coverage of this function, then it would probably be easiest to use it for non-Ttk labelframe widgets with overflowing text; see latest attached patch. fvogel added on 2023-07-16 13:43:45: Always a pleasure to deal with your well formatted reports, step by step reasoning and perfect code. Very clear all way along. Many many thanks! All patches now committed in a dedicated branch bug-f9eddb541a. The code builds now on all the three platforms. What else remains to be done in your opinion? chrstphrchvz added on 2023-07-16 12:14:54:
Something to do later would be to have code in core Tk try to use XSetClipRectangles() instead of TkSetRegion(), since the latter now requires copying a region. Never mind, for rectangular regions there is probably not much overhead compared to copying just a rectangle. | |||
Attachments:
- labelframe-xscr.diff [download] added by chrstphrchvz on 2023-07-16 17:18:23. [details]
- 0006-Optimize-XSetClipRectangles.patch [download] added by chrstphrchvz on 2023-07-16 12:04:00. [details]
- 0005-Implement-XSetClipRectangles-on-Windows.patch [download] added by chrstphrchvz on 2023-07-16 12:03:54. [details]
- 0004-Make-TkSetRegion-safer.patch [download] added by chrstphrchvz on 2023-07-16 12:03:46. [details]
- 0003-Style-adjustment-to-FreeClipMask.patch [download] added by chrstphrchvz on 2023-07-16 12:03:39. [details]
- 0002-Make-AllocClipMask-safer.patch [download] added by chrstphrchvz on 2023-07-16 12:03:32. [details]
- 0001-Add-TkpCopyRegion.patch [download] added by chrstphrchvz on 2023-07-16 12:03:03. [details]
