#include /* * This program creates two windows, and calls * gtk_window_set_decorated(..., FALSE) on both. The first window is * shown before the set_decorated call, the second window is shown * after the set_decorated call. On Ubuntu < 10.04, both windows do * not have WM decorations, as expected. However, on Ubuntu 10.04, the * window that was shown after the call to set_decorated will still * have WM decorations. */ int main(int argc, char *argv[]) { gtk_init(&argc, &argv); GtkWidget* window = gtk_window_new(GTK_WINDOW_TOPLEVEL); gtk_widget_show(window); gtk_window_set_decorated(GTK_WINDOW(window), FALSE); GtkWidget* label = gtk_label_new("I shouldn't have decorations, and I won't"); gtk_widget_show(label); gtk_container_add(GTK_CONTAINER(window), label); GtkWidget* window2 = gtk_window_new(GTK_WINDOW_TOPLEVEL); gtk_window_set_decorated(GTK_WINDOW(window2), FALSE); gtk_widget_show(window2); GtkWidget* label2 = gtk_label_new("I shouldn't have decorations, and I will"); gtk_widget_show(label2); gtk_container_add(GTK_CONTAINER(window2), label2); gtk_main(); return 0; }