Question about gtk_window_set_has_frame



Hi,

My application works on X11 without window manager and I use
gtk_window_set_has_frame on message window (in the goal to draw a
colored border) like in this example :

dialogue = gtk_message_dialog_new(window,
                                  GTK_DIALOG_MODAL,
                                  GTK_MESSAGE_QUESTION,
                                  GTK_BUTTONS_CANCEL,
                                  "Voulez-vous vraiment quitter
l'application ?");
gtk_dialog_add_button(GTK_DIALOG(dialogue),
                      GTK_STOCK_QUIT,
                      GTK_RESPONSE_ACCEPT);
gtk_window_set_has_frame(GTK_WINDOW(dialogue), TRUE);
gtk_window_set_frame_dimensions(GTK_WINDOW(dialogue),
                                6, 6, 6, 6);
gtk_widget_show_all(dialogue);

This simple code works fine in GTK+2.2 (gtk2-2.2.4-5.1 on fc1) but show
this error with GTK+ 2.4 (gtk2-2.4.7-1.1.fc2.nr) :

(ui:9975): Gdk-CRITICAL **: file gdkwindow-x11.c: line 3506
(gdk_window_set_icon): assertion `GDK_WINDOW_TYPE (window) !=
GDK_WINDOW_CHILD' failed

I know "frame" functions are designed for frame buffer mode but they
must be work on X11 environment.

Stephane




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]