Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>It seems that this behavior comes from a difference in how Gnome handles windows with different "type hints"...it puts them into their own z-index groupings:</p> <p><a href="https://developer.gnome.org/gdk3/stable/gdk3-Windows.html#GdkWindowTypeHint" rel="nofollow noreferrer">https://developer.gnome.org/gdk3/stable/gdk3-Windows.html#GdkWindowTypeHint</a></p> <p>The dialog is created with <code>GDK_WINDOW_TYPE_HINT_DIALOG</code> while your other window is most likely created with <code>GDK_WINDOW_TYPE_HINT_NORMAL</code>. The point where this decision is made is in <code>gtk/toplevel.cpp</code> and it's being cued by the fact that the "extra" style flags contain <code>wxTOPLEVEL_EX_DIALOG</code>:</p> <p><a href="https://github.com/wxWidgets/wxWidgets/blob/2c69d27c0d225d3a331c773da466686153185320/src/gtk/toplevel.cpp#L594" rel="nofollow noreferrer">toplevel.cpp#L594</a></p> <p>Those are the only two calls to <code>gtk_window_set_type_hint</code> in the wxWidgets GTK codebase, except for in the splash screen code. So changing the "extra" style bits after the fact isn't going to help. (The "correct" solution would be to patch wxWidgets so that adjusting <code>wxTOPLEVEL_EX_DIALOG</code> in the extra styles would do the proper adjustment to the window type hint.)</p> <p>You can't use the wxDialog class without running through its constructor, which calls the non-virtual method <code>wxDialog::Create</code>, which sets the extra style to <code>wxTOPLEVEL_EX_DIALOG</code> and then goes directly to top level window creation:</p> <p><a href="https://github.com/wxWidgets/wxWidgets/blob/2c69d27c0d225d3a331c773da466686153185320/src/gtk/dialog.cpp#L54" rel="nofollow noreferrer">dialog.cpp#L54</a></p> <p>So I guess you have the option of trying this, which works if you haven't shown the dialog window yet:</p> <pre><code>#ifdef __WXGTK__ gtk_window_set_type_hint( GTK_WINDOW(iShouldBeUsingQtDialog-&gt;GetHandle()), GDK_WINDOW_TYPE_HINT_NORMAL); #endif </code></pre> <p>...and if you have shown the dialog already, you need to use this for it to work:</p> <pre><code>#ifdef __WXGTK__ gdk_window_set_type_hint( iShouldBeUsingQtDialog-&gt;GetHandle()-&gt;window, GDK_WINDOW_TYPE_HINT_NORMAL); #endif </code></pre> <p>Both cases will require you to add an include file into your source:</p> <pre><code>#ifdef __WXGTK__ #include "gtk/gtkwindow.h" #endif </code></pre> <p>...and you'll have to update your build to find the GTK includes. On the command line for G++ I tried this and it worked:</p> <pre><code>pkg-config --cflags --libs gtk+-2.0 </code></pre>
    singulars
    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.
 

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