Tk Source Code

View Ticket
Login
2026-10-06
10:03 • Closed ticket [2ef5dd80]: Aqua: "pack forget" leaves window on screen plus 7 other changes artifact: 21167834 user: jan.nijtmans
10:00
Fix [2ef5dd8036] and [307b06cbc2]: Aqua: "pack forget" leaves window on screen check-in: e1e4cbd6 user: jan.nijtmans tags: core-9-0-branch
09:48
Fix [2ef5dd8036] and [307b06cbc2]: Aqua: "pack forget" leaves window on screen check-in: 19dc130e user: jan.nijtmans tags: trunk, main
09:46 • Closed ticket [307b06cb]: Gridded widget is not drawn in some cases (Aqua). plus 7 other changes artifact: 050d69c9 user: jan.nijtmans
2026-09-29
15:57 • Ticket [307b06cb]: 4 changes artifact: 76369357 user: serhiy.storchaka
15:57 • Ticket [2ef5dd80] Aqua: "pack forget" leaves window on screen status still Open with 4 other changes artifact: f722d65d user: serhiy.storchaka
15:28
Fix [2ef5dd8036] and [307b06cbc2]: Aqua: "pack forget" leaves window on screen. Since 9.0, unmapping a non-toplevel window no longer redrew its toplevel, so the area from which the window was removed was not redrawn and no Expose events were generated. Schedule the redraw in an idle task, as XMapWindow and XDestroyWindow do. closed check-in: 1b1c0ed6 user: serhiy.storchaka tags: aqua-unmap-redraw
2026-07-30
12:41 • Add attachment exercise.tcl to ticket [2ef5dd80] artifact: 68b37b88 user: erikleunissen
12:40 • Delete attachment "exercise.tcl" from ticket [2ef5dd80] artifact: 316450f8 user: erikleunissen
12:00 • Ticket [2ef5dd80] Aqua: "pack forget" leaves window on screen status still Open with 3 other changes artifact: ca2df2b9 user: erikleunissen
11:59 • Ticket [2ef5dd80]: 3 changes artifact: 059097e7 user: erikleunissen
11:58 • Add attachment exercise.tcl to ticket [2ef5dd80] artifact: 0a63aaa7 user: erikleunissen
11:58 • New ticket [2ef5dd80] Aqua: "pack forget" leaves window on screen. artifact: 7394401d user: erikleunissen

Ticket UUID: 2ef5dd8036432dddb04ea494a5556e84832bcc7
Title: Aqua: "pack forget" leaves window on screen
Type: Bug Version: 9.0 and later, 9.0.5, 9.1b1
Submitter: erikleunissen Created on: 2026-07-30 11:58:23
Subsystem: 48. Geometry Management Assigned To: jan.nijtmans
Priority: 5 Medium Severity: Important
Status: Closed Last Modified: 2026-10-06 10:03:00
Resolution: Fixed Closed By: jan.nijtmans
    Closed on: 2026-10-06 10:03:00
Description:
Observed with aqua/macOS Sequoia
- with Tk9.0.4 and Tk9.1b0
- not observed with Tk8.6.18.

To reproduce:

> wish9.0
% pack [frame .f -width 100 -height 100 -bg blue]
% pack forget .f

With Tk8.6.18 the blue frame disappears from the screen, and an <Expose> event
is generated for the Tk root window, all as expected.
With Tk9.0.4 and Tk9.1b1 the blue frame remains on screen and no <Expose>
event on the Tk root window is generated/serviced.

The attached script exercise.tcl can be used to reproduce the issue including
the handling of window events.
User Comments: jan.nijtmans added on 2026-10-06 10:03:00:

Fixed in [19dc130ec33220b0|trunk], also backported to core-9-0-branch

Many thanks!


serhiy.storchaka added on 2026-09-29 15:57:06:

Since 9.0, XUnmapWindow() does not redraw the toplevel when a non-toplevel window is unmapped, so the area from which the window was removed is not redrawn and no Expose events are generated. Since [fe5604ad44], XMapWindow() and XDestroyWindow() schedule the redraw in an idle task, but XUnmapWindow() does not. The same cause was found in [307b06cbc2].

Proposed fix in branch aqua-unmap-redraw: XUnmapWindow() schedules the same idle redraw. I could not test it, as I have no macOS.


Attachments: