ref: d952a3b6ffb62e56f29760cfe843e5c0fc43c96a
parent: 077aa510c78f3273bd0d4ca4f1ca14780822ebf9
author: Simon Tatham <anakin@pobox.com>
date: Sat May 20 08:06:41 EDT 2006
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]
--- a/gtk.c
+++ b/gtk.c
@@ -672,6 +672,8 @@
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 @@
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));