Modal dialogs in Gtk

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