Tk Source Code

View Ticket
Login
Ticket UUID: 3414089
Title: Grab interaction problem on Windows-XP
Type: Bug Version: obsolete: 8.5.10
Submitter: cjmcdonald Created on: 2011-09-26 16:18:00
Subsystem: 56. [grab] Assigned To: patthoyts
Priority: 5 Medium Severity: Minor
Status: Open Last Modified: 2013-11-11 10:25:43
Resolution: None Closed By: nobody
    Closed on:
Description:
The attached script demonstrates a grab interaction
problem on Windows-XP. It creates a pop-up
transient dialog, and uses grab to make it modal,
waiting until the user clicks OK before interaction
with the rest of the application continues.  For
demonstration the script is kept very simple.

Whilst the pop-up dialog is visible, click right on
some empty space in the Windows-XP taskbar and
select "Show Desktop".  This minimises all open
application windows.  It is then impossible for the
user to restore the minimised Tk application
window.  The application has to be killed using the
task manager.

This problem appears to be another unintended
consequence of bug fix 1847002 (also see
#2896605).  Using wish 8.5.6 works as expected,
after the "Show Desktop" the user can click on the
minimised application window in the task bar in
order to restore it.
User Comments: thomasmenez added on 2011-11-08 06:01:31:
I regularly use modal dialog boxes (i.e. grabbed windows) in
my apps under Win XP. When such a box is opened, and when
"Windows Logo + M" is depressed (minize all windows), then
the application gets into an irrecoverable state and
has to be killed with the task manager...
Here is the code to reproduce the issue. Using "transient"
is at the core of the problem :

toplevel .modalToplevel
button .modalToplevel.b -text Button
pack .modalToplevel.b

# Removing this line solves the issue, as the modal dialog
# remains and is  discardable... :
wm transient .modalToplevel .

grab set .modalToplevel 

Now hit "Windows Logo" + M and you're doomed.

cjmcdonald added on 2011-09-26 23:18:01:

File Added - 424542: dialog_demo.tcl

Attachments: