2 --- gtk/gx11.c 4 Apr 2004 10:07:47 -0000 1.48
3 +++ gtk/gx11.c 16 May 2004 06:09:21 -0000 1.50
7 /* Event handlers for map drawing area */
9 +/* For a reason I don't know, this gets called a whole bunch.
10 + * every time a monster is killed, this gets called for a reason
11 + * I can't figure out.
15 configure_event (GtkWidget *widget, GdkEventConfigure *event)
17 + static sint16 ox=-1, oy=-1;
19 + /* Handle the surplus number of events that this causes to be generated.
20 + * basically, if the size of the window hasn't changed, we really don't
21 + * care - position of the window isn't important.
22 + * note that we could be more clever and free up the other data even on
23 + * requests that do change the size,
24 + * but this will fix the most horrendous memory leak
26 + if (event->type == GDK_CONFIGURE) {
27 + if (((GdkEventConfigure*)event)->width == ox && ((GdkEventConfigure*)event)->height == oy)
31 + fprintf(stderr, "ox=%d != %d, oy=%d != %d\n", ox, ((GdkEventConfigure*)event)->width,
32 + oy, ((GdkEventConfigure*)event)->height);
34 + ox = ((GdkEventConfigure*)event)->width;
35 + oy = ((GdkEventConfigure*)event)->height;
40 if(use_config[CONFIG_SDL]) {
41 - /* When program first runs, mapsruface can be null.
42 + /* When program first runs, mapsurface can be null.
43 * either way, we want to catch it here.