Web lists-archives.com

Another difference between X11 and Wayland




I previously reported a couple of differences in behaviour between GTK+
with the X11 and Wayland backends.  Here's another one.

The attached program has an expander which is set to resize the containing
top level window.  With the Wayland backend the window grows every time
the expander is opened or closed.

This is on Fedora 25 with GTK+ 3.22.8.

Ron
#include <gtk/gtk.h>

int main(int argc, char **argv)
{
    GtkWidget *shell, *expander, *label;

	gtk_init(&argc, &argv);

	shell = gtk_window_new(GTK_WINDOW_TOPLEVEL);
	gtk_window_set_title(GTK_WINDOW(shell), "tester");
	g_signal_connect(G_OBJECT(shell), "destroy",
						G_CALLBACK(gtk_main_quit), NULL);

	expander = gtk_expander_new("Expander");
	gtk_expander_set_resize_toplevel(GTK_EXPANDER(expander), TRUE);
	gtk_container_add(GTK_CONTAINER(shell), GTK_WIDGET(expander));

	label = gtk_label_new("Label");
	gtk_container_add(GTK_CONTAINER(expander), GTK_WIDGET(label));

	gtk_widget_show_all(shell);

	gtk_main();

    return 0;
}
_______________________________________________
gtk-list mailing list
gtk-list@xxxxxxxxx
https://mail.gnome.org/mailman/listinfo/gtk-list