| Ticket UUID: | 2891877 | |||
| Title: | 32k pixel limit when viewing a scrolled frame on a canvas | |||
| Type: | Bug | Version: | 8.5.7, 8.6.18, 9.0.5, 9.1b1 | |
| Submitter: | kjnash | Created on: | 2009-11-04 12:34:27 | |
| Subsystem: | 05. Canvas Items | Assigned To: | hobbs | |
| Priority: | 5 Medium | Severity: | ||
| Status: | Open | Last Modified: | 2026-09-22 11:42:03 | |
| Resolution: | None | Closed By: | ||
| Closed on: | ||||
| Description: |
I was told at Tcl 2009 that Tk windows on X11 should no longer have a 32k pixel limit, and any such limitations should be reported as bugs. A canvas item that is a frame can be much larger than 32k pixels, but the region that can be viewed by scrolling is never much more than 32k. The attached file is a test that demonstrates the problem. Tested on ActiveTcl 8.5.7.1 and 8.6.0.0b2, Linux x86 with X-server Xorg-1.5.3 | |||
| User Comments: |
serhiy.storchaka added on 2026-09-22 11:42:03:
Still reproducible with 9.1, but this is a platform limitation, not Tk's clamping of the coordinates. Canvas graphics items are not affected: a text item of 90000 pixels height scrolls correctly at any offset. For an embedded window the position of the child window relative to the canvas cannot exceed the 16-bit range: on X11 ConfigureWindow uses INT16, and Windows keeps window coordinates in the same range. I checked this by removing the clamping in Tk (Tk_CanvasWindowCoords() stores the position in a short): with a frame of 70000 pixels height in a canvas, content at the offset 25000 is displayed correctly, and at the offset 40000 nothing is displayed, with and without the clamping, on Windows as well as on X11. The clamping only keeps "winfo y" consistent with what the platform does. The workaround is to scroll the embedded widget itself instead of scrolling a huge widget in the canvas, or to draw the content with canvas items. kjnash added on 2009-11-04 19:34:28: File Added - 349503: 32k-pixels-test.tcl | |||
Attachments:
- 32k-pixels-test.tcl [download] added by kjnash on 2009-11-04 19:34:28. [details]
