Tk Source Code

View Ticket
Login
2026-09-28
10:21
Add changelog for: [3138512] MS-Win: fix grab-global window inresponsive after key Win-D check-in: 19bd7482 user: oehhar tags: core-8-6-branch
10:14
Add changelog for: [3138512] MS-Win: fix grab-global window inresponsive after key Win-D check-in: 1180bcc9 user: oehhar tags: core-9-0-branch
09:36
Fix [3138512]: an application with a global grab could not be restored from the taskbar after "show desktop". Backport of [3f5170775d]. check-in: ea3578c9 user: serhiy.storchaka tags: core-8-6-branch
09:36
Fix [3138512]: an application with a global grab could not be restored from the taskbar after "show desktop". Backport of [3f5170775d]. check-in: a971df06 user: serhiy.storchaka tags: core-9-0-branch
09:21 • Closed ticket [3138512f]: Tk applicatications after grab command (both local/global mo plus 10 other changes artifact: df440e81 user: oehhar
08:42
[3138512] MS-Win: fix grab-global window inresponsive after key Win-D check-in: 3f517077 user: oehhar tags: trunk, main
2026-09-25
10:24 • Closed ticket [3009450f]: Can't deiconify window if a child toplevel is grabbed plus 4 other changes artifact: 70ca1123 user: serhiy.storchaka
10:21 • Ticket [3138512f] Tk applicatications after grab command (both local/global mo status still Open with 3 other changes artifact: 20bcd4ff user: serhiy.storchaka
10:20
Fix [3138512]: an application with a global grab could not be restored from the taskbar after "show desktop". The mouse capture set by the global grab stops Windows from restoring the minimized window. Release the capture on SC_RESTORE; Tk sets it again on the next pointer event. testwinevent now accepts WM_SYSCOMMAND; new test winWm-9.3. closed check-in: ba25235a user: serhiy.storchaka tags: win-global-grab-restore
2010-12-16
09:46 • New ticket [3138512f] Tk applicatications after grab command (both local/global mo. artifact: d0e4b42c user: akurbatov

Ticket UUID: 3138512
Title: Tk applicatications after grab command (both local/global mo
Type: Bug Version: None
Submitter: akurbatov Created on: 2010-12-16 09:46:13
Subsystem: 56. [grab] Assigned To: oehhar
Priority: 5 Medium Severity: Minor
Status: Closed Last Modified: 2026-09-28 09:21:08
Resolution: Fixed Closed By: oehhar
    Closed on: 2026-09-28 09:21:08
Description:
XP SP2,XP SP3,..,Win7 32-64bit
Tk 8.5.9 ,8.6.0 (but not 8.4.*)

1) start any application, for example: notepad.exe
2) start ..>Demos>TK 
     Miscellaneous > 2. A dialog box with a local grab. 
3) click on Task_Manager/Show_Desktop button
4) click on Task_Manager/notepad.exe icon (or any others Task_Manager icons)

Oops.. (Tk application minimized forever)

Bug #3009450 ?
User Comments: oehhar added on 2026-09-28 09:21:08:

Thanks. Here is my test case:

toplevel .t
pack [button .t.b -text close -command {destroy .t}]
grab -global .t
  • Start wish and enter test code
  • Press Win+D
  • try to restore the window labeled "t" from the task bar (not wishxx) -> it stays minimized.

Merged to branches:

  • main: [3f517077]
  • core-9-0-branch: problem not present (no idea why)

Anyway, thanks for all, Harald


serhiy.storchaka added on 2026-09-25 10:21:17:

The local grab case was fixed by [b86736bbf7] ([ed6c3a787d]). With grab -global it still fails on Windows 11 with 8.6.18 and 9.1: the mouse capture held by the global grab prevents Windows from restoring the minimized window.

Proposed fix in [ba25235ae7] (branch win-global-grab-restore): release the capture on SC_RESTORE; Tk sets it again on the next pointer event. New test winWm-9.3 fails without the fix.