#include #include #include int main(int argc, char **argv){ GtkDialog *dialog; GtkWidget *vbox2; GtkWidget *onlychild; gtk_init(NULL, NULL); dialog = gtk_dialog_new_with_buttons ("TEST-WINDOW with FIXED WIDTH", NULL, GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT, GTK_STOCK_OK, GTK_RESPONSE_ACCEPT, GTK_STOCK_CANCEL, GTK_RESPONSE_REJECT, NULL); gtk_window_set_resizable(GTK_WINDOW(dialog), TRUE); GdkGeometry hints; hints.min_width = 400; //Setting minimal Width 400 hints.min_height = -1; gtk_window_set_geometry_hints( GTK_WINDOW( dialog ), GTK_WINDOW( dialog ), & hints, GDK_HINT_MIN_SIZE ); gtk_widget_show(dialog); while (gtk_events_pending ()) gtk_main_iteration(); gtk_dialog_run(dialog); //Activate here a breakpoint on clientConfigure() in client.c and click on ok. XResizeWindow(GDK_DISPLAY(), GDK_WINDOW_XWINDOW(dialog) , 300, 100); //(1) The X-server generates a ConfigureRequest for the window with a resize width to 300 (RIGHT!) //(2) the xfwm modifies this request to a width of 400 due to the minimal_with of 400 (RIGHT!) //(3) and does with this new width of 400 a XconfigureWindow (BUG!) //(4) in turn this XConfigureWindow generates no ConfigureNotify by the x-server, because no change to the //window is done, because the window width is already 400 (RIGHT) //With my patch supplied step 3 is korrected an the xfwm generates a synthetical ConfigureNotify event and //dont asks the Xserver to resize the window (which has allready width 400) to 400 gtk_dialog_run(dialog); }