macOS: transient windows can't be raised against each other
Steps to reproduce
- Open two transient windows with the same parent
- Click the first opened window to raise it above the second one
Current behavior
Transient window 1 can't be raised above transient window 2.
Expected outcome
Transient window 1 can be raised above transient window 2, to be consistent with other platforms (Linux and Windows).
Version information
- macOS 10.14
- gtk-3-24 (
9c8babacae77
) - MacPorts environment with self-compiled Gtk, configured as
meson --buildtype=debugoptimized --prefix=/opt/local
Example program
#include <gtk/gtk.h>
static void activate (GtkApplication* app, gpointer user_data)
{
char transienttitle[] = "0 Transient Window";
int transient_count = 2;
GtkWidget *parentwindow;
parentwindow = gtk_application_window_new (app);
gtk_window_set_title (GTK_WINDOW (parentwindow), "Parent Window");
gtk_window_set_default_size (GTK_WINDOW (parentwindow), 400, 200);
while (transient_count-- > 0) {
GtkWidget *transientwindow = gtk_window_new (GTK_WINDOW_TOPLEVEL);
++transienttitle[0];
gtk_window_set_title (GTK_WINDOW (transientwindow), transienttitle);
gtk_window_set_default_size (GTK_WINDOW (transientwindow), 300, 100);
gtk_window_set_transient_for (GTK_WINDOW(transientwindow), GTK_WINDOW(parentwindow));
gtk_widget_show_all (transientwindow);
}
gtk_widget_show_all (parentwindow);
}
int main (int argc, char **argv)
{
GtkApplication *app;
int status;
app = gtk_application_new ("test.transient", G_APPLICATION_FLAGS_NONE);
g_signal_connect (app, "activate", G_CALLBACK (activate), NULL);
status = g_application_run (G_APPLICATION (app), argc, argv);
g_object_unref (app);
return status;
}
gcc `pkg-config --cflags gtk+-3.0` transienttest.c `pkg-config --libs gtk+-3.0`