Tk Source Code

View Ticket
Login
Ticket UUID: 2814003
Title: tk_messageBox unresponsive on global grab
Type: Bug Version: obsolete: 8.5.7
Submitter: oehhar Created on: 2009-06-29 14:12:44
Subsystem: 56. [grab] Assigned To: aku
Priority: 5 Medium Severity: Minor
Status: Closed Last Modified: 2026-10-11 19:35:07
Resolution: Fixed Closed By: nemethi
    Closed on: 2026-10-11 19:35:07
Description:
A message box is inresponsive, if there is a global grab on another widget.

Example:
pack [button .b -text t -command "tk_messageBox"]
focus .b
raise .
grab -global .b

This might be seen as feature, but it might be helpful, to replace the grab of message box by the existing grab, and restore it afterwards.

On Windows XP, tk 8.5.7
User Comments: nemethi (claiming to be Csaba Nemethi) added on 2026-10-11 19:35:07:

Serhiy, many thanks for fixing this long-standing bug! Merged into main, core-9-0-branch, and core-8-6-branch by commits [53768e62], [8e38cdde], and [e478efd5].


serhiy.storchaka added on 2026-09-19 17:27:42:

Reproduced on Windows 11 with 8.6.18 and 9.1 when the message box is opened from a mouse click: the button release restores the mouse capture of the global grab window just before the command runs, and the native dialog gets no mouse input. The capture is now released while a native modal dialog (message box, file, color and font dialogs) is displayed and restored afterwards. Fixed in [a99e830636] (branch win-dialog-release-capture).


oehhar added on 2020-11-17 10:44:08:

Just retried the test script and still an issue on 8.6.10. Leave it open, as it might be quite annoying.