Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

dismissing a tk_dialog

3 views
Skip to first unread message

Larry W. Virden

unread,
Jul 16, 2010, 7:06:58 AM7/16/10
to
I received a question recently about an application which was using
tk_dialog. The application shouldn't have been using tk_dialog, in my
opinion, but that isn't the issue.

On SPARC Solaris, using GNOME, when the tk_dialog appears, it has a
dialog's window manager frame . There's an "X" for dismissing the
widget that is displayed.

A user tried to use the X to dismiss the dialog, but because tk_dialog
had the grab, they were unsuccessful.

Shouldn't tk_dialog use wm overrideredirect to get rid of the frame
title bar? Otherwise, the user is led to believe there is a way to
dismiss the widget where there is in fact no way to do that.

Jeff Hobbs

unread,
Jul 16, 2010, 12:22:46 PM7/16/10
to

wm override would cause the entire wm managed frame to disappear, but
that is not what tk_dialog does. It pops up a modal, complete with wm
frame, for user interaction. It should have the wm [X] to close it,
and that should work.

Jeff

Larry W. Virden

unread,
Jul 16, 2010, 2:26:00 PM7/16/10
to
On Jul 16, 12:22 pm, Jeff Hobbs <jeff.ho...@gmail.com> wrote:
>  It should have the wm [X] to close it,
> and that should work.
>

Okay, then what we are seeing is a bug rather than an oversight.
Thanks - I'll report it.

Jeff Hobbs

unread,
Jul 16, 2010, 2:44:46 PM7/16/10
to

So I misspoke. Checking the code, tk_dialog explicitly does this:

wm protocol $w WM_DELETE_WINDOW { }

So it will ignore the [X]. I would recommend instead tklib
widget::dialog, but that would require code changes.

Jeff

0 new messages