Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>This is my guess:</p> <ol> <li>the problem is related to focus grabbing;</li> <li>the window widget calls grab APIs only when the modal flag <a href="http://git.gnome.org/browse/gtk+/tree/gtk/gtkwindow.c#n2240" rel="nofollow" title="Source code of `gtk_window_set_modal()`">changes its state</a>;</li> <li>differences between platforms are mostly due to implementation details;</li> <li>you cannot have more than a single modal window.</li> </ol> <p>At the time you show <code>reused_dialog</code>, it is not clear which dialog is modal (<code>parent_window</code> is still alive).</p> <p>The right solution: I suspect if you refactor your code to show <code>reused_dialog</code> from a callback (using the <a href="http://developer.gnome.org/gtk/stable/GtkDialog.html#GtkDialog-response" rel="nofollow" title="Documentation for the GtkDialog:response signal">response</a> signal, for example), you'll get the desired result because this is the <em>usual way™</em>.</p> <p>If you don't want to refactor you could try one of these solutions/work-arounds (roughly in order of what I think is better):</p> <ul> <li><p>always disactivate the modal state of <code>reused_dialog</code> before running it; <code>gtk_dialog_run()</code> <a href="http://git.gnome.org/browse/gtk+/tree/gtk/gtkdialog.c#n1075%3a" rel="nofollow" title="Source code of `gtk_dialog_run()`">will set it</a> again, triggering what requested:</p> <pre><code>... gtk_window_set_modal(GTK_WINDOW(reused_dialog), FALSE); gtk_dialog_run(GTK_DIALOG(reused_dialog)); ... </code></pre></li> <li><p>manually grab the focus in <code>reused_dialog</code> before running it:</p> <pre><code>... gtk_grab_add(reused_dialog); gtk_dialog_run(GTK_DIALOG(reused_dialog)); ... </code></pre></li> <li><p>deactivate the modal status of the <code>parent_window</code> after run:</p> <pre><code>... gtk_dialog_run(GTK_DIALOG(parent_dialog)); gtk_window_set_modal(GTK_WINDOW(parent_dialog), FALSE); ... </code></pre></li> </ul>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload