# Modal dialogs in Gtk

**URL:** <https://www.ruby-forum.com/t/modal-dialogs-in-gtk/74950>\
**Category:** Ruby\
**Created:** [November 7, 2006, 11:03am UTC](https://www.ruby-forum.com/t/modal-dialogs-in-gtk/74950 "2006-11-07T11:03:44Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![WoodHacker](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/ac8455/32.png) [@WoodHacker](https://www.ruby-forum.com/u/WoodHacker)\
**Post date:** [November 7, 2006, 11:03am UTC](https://www.ruby-forum.com/t/modal-dialogs-in-gtk/74950/1 "2006-11-07T11:03:44Z")

</div>

Can anyone explain why my modal dialogs are not freezing the screen?  
I can click on the window behind the dialog window and the dialog  
disappears.

```
dialog = Gtk::Dialog.new(Utils.getT("test"),
$main_application_window,
Gtk::Dialog::DESTROY_WITH_PARENT)

dialog.width_request = 600
dialog.modal = true
dialog.window_position = Gtk::Window::POS_CENTER_ALWAYS
dialog.transient_for = $main_application_window

........

```

Everything else about it works fine.

Bill
