Trivial patch from Ben Hutchings to support resizable windows under

GTK. All the infrastructure in the midend and beyond was already
there; it was just a matter of enabling it!

[originally from svn r6712]
This commit is contained in:
Simon Tatham
2006-05-20 12:06:41 +00:00
parent 077aa510c7
commit d952a3b6ff

8
gtk.c
View File

@ -672,6 +672,8 @@ static gint configure_area(GtkWidget *widget,
gc = gdk_gc_new(fe->area->window);
gdk_gc_set_foreground(gc, &fe->colours[0]);
gdk_draw_rectangle(fe->pixmap, gc, 1, 0, 0, fe->pw, fe->ph);
gdk_draw_rectangle(widget->window, gc, 1, 0, 0,
event->width, event->height);
gdk_gc_unref(gc);
midend_force_redraw(fe->me);
@ -1493,11 +1495,7 @@ static frontend *new_window(char *arg, char **error)
fe->window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
gtk_window_set_title(GTK_WINDOW(fe->window), thegame.name);
#if 0
gtk_window_set_resizable(GTK_WINDOW(fe->window), FALSE);
#else
gtk_window_set_policy(GTK_WINDOW(fe->window), FALSE, FALSE, TRUE);
#endif
vbox = GTK_BOX(gtk_vbox_new(FALSE, 0));
gtk_container_add(GTK_CONTAINER(fe->window), GTK_WIDGET(vbox));
gtk_widget_show(GTK_WIDGET(vbox));