Tk Source Code

View Ticket
Login
2026-10-24
17:42 • Closed ticket [562c3a3d]: transient windows don't appear on Windows plus 8 other changes artifact: f2bde156 user: nemethi
17:34
Fix for [562c3a3da5]: transient windows don't appear on Windows check-in: 8fcd84d4 user: csaba tags: core-8-6-branch
17:22
Fix for [562c3a3da5]: transient windows don't appear on Windows check-in: 83373d40 user: csaba tags: core-9-0-branch
17:10
Fix for [562c3a3da5]: transient windows don't appear on Windows check-in: b56b1a05 user: csaba tags: trunk, main
2026-09-27
18:06 • Ticket [562c3a3d] transient windows don't appear in WinXP status still Open with 4 other changes artifact: 8ffe9c8a user: serhiy.storchaka
18:04
Fix [562c3a3da5]: on Windows a transient withdrawn before its container was mapped could not be deiconified. TkWmMapWindow() returned early without creating the wrapper, so the window stayed never mapped and "wm deiconify" only recorded the new state. Now the wrapper is created withdrawn, as on X11 and macOS. New test wm-transient-8.2. closed check-in: 90f2a85d user: serhiy.storchaka tags: win-transient-deiconify
2015-04-07
14:30 • New ticket [562c3a3d] transient windows don't appear in WinXP. artifact: 4fd1f5aa user: gwooledge

Ticket UUID: 562c3a3da5b015d810d348292408cd953788c90c
Title: transient windows don't appear on Windows
Type: Bug Version: 8.6.4, 8.6.18, 9.0.5, 9.1b1
Submitter: gwooledge Created on: 2015-04-07 14:30:53
Subsystem: 68. Win Window Operations Assigned To: nobody
Priority: 5 Medium Severity: Minor
Status: Closed Last Modified: 2026-10-24 17:42:39
Resolution: Fixed Closed By: nemethi
    Closed on: 2026-10-24 17:42:39
Description:
http://wooledge.org/~greg/tk864-transient is a very stripped-down version of my application, which demonstrates the issue.  Double-clicking inside the listbox is supposed to bring up the transient window.  This works on Linux, but not on Windows XP Professional 32-bit.  (Double-clicking in XP gives no visible result at all.)

If I comment out "wm transient .bar .foo" then the window appears.

I compiled Tcl 8.6.4 and Tk 8.6.4 using MINGW32.  I only had to change one line in Tk: in tk8.6.4/win/tkWinDialog.c I had to comment out #include <shobjidl.h>
User Comments: nemethi (claiming to be Csaba Nemethi) added on 2026-10-24 17:42:39:

Serhiy, many thanks! Merged into main, core-9-0-branch, and core-8-6-branch by commits [b56b1a05], [83373d40], and [8fcd84d4].


serhiy.storchaka added on 2026-09-27 18:06:57:

Still reproducible on Windows 11 with 8.6, 9.0 and 9.1, with the script from the description (still available at the link). The command renaming does not matter: a transient withdrawn before its container is mapped cannot be deiconified.

toplevel .t1
toplevel .t2
wm transient .t2 .t1
wm withdraw .t2
update
wm deiconify .t2   ;# .t2 is not shown

TkWmMapWindow() returned early for a transient whose container was not mapped, without creating the wrapper, so the window stayed never mapped and wm deiconify only recorded the new state. X11 and macOS create the window withdrawn in this case.

Proposed fix in branch win-transient-deiconify, with test wm-transient-8.2.