Tk Source Code

View Ticket
Login
Ticket UUID: 586f722cdd18031f93928104649e8353fb89ca7a
Title: New test winfo-4.8 fails
Type: Bug Version: 9.0.5, 9.1.0
Submitter: dgp Created on: 2026-05-27 15:13:49
Subsystem: 65. Generic Window Operations Assigned To: nobody
Priority: 5 Medium Severity: Minor
Status: Closed Last Modified: 2026-11-10 14:34:52
Resolution: Fixed Closed By: nemethi
    Closed on: 2026-11-10 14:34:52
Description:
==== winfo-4.8 "winfo containing": don't consider unmapped toplevel windows (bug #591829e948-B) FAILED
==== Contents of test case:

    toplevel .one
    wm geometry .one 200x200+350+100
    after 10; update
    wm withdraw .one
    after 10; update
    winfo containing 450 200

---- Result was:
.one
---- Result should have been (exact matching):

==== winfo-4.8 FAILED
User Comments: nemethi (claiming to be Csaba Nemethi) added on 2026-11-10 14:34:52:

Serhiy, many thanks! Merged into main, core-9-0-branch, and core-8-6-branch by commits [d25d2eeb], [2431c82b], and [5a03b015].


serhiy.storchaka added on 2026-10-24 08:38:39:

This is a race: wm withdraw unmaps the toplevel at once, but its window manager frame stays mapped until the window manager handles the unmap, and Tk_CoordsToWindow() still returned the toplevel. With a slow window manager, after 10 is not enough.

Fixed on branch x11-coords-to-window ([8a0667c7fc]): a toplevel which is not mapped is not returned. New test winfo-4.9 has no delay; without the fix it failed under openbox and icewm in every run.