ocarina: Return FALSE from the configure event

This tells gtk to continue processing the signal and actually redraw the
window...

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
This commit is contained in:
Bryan Schumaker 2012-03-12 18:10:38 -04:00
parent 4448ba7ce1
commit ecd9a28add
1 changed files with 4 additions and 3 deletions

View File

@ -25,7 +25,7 @@ static void destroy(GtkWidget *widget, GdkEvent *event, gpointer data)
ocarina::quit();
}
static void configure(GtkWidget *widget, GdkEvent *event, gpointer data)
static gboolean configure(GtkWidget *widget, GdkEvent *event, gpointer data)
{
int w, h;
int old_w = libsaria::prefs::get("ocarina.window.w");
@ -33,12 +33,12 @@ static void configure(GtkWidget *widget, GdkEvent *event, gpointer data)
if (ignore_configure_event == true) {
ignore_configure_event = false;
return;
return FALSE;
}
gtk_window_get_size(GTK_WINDOW(win), &w, &h);
if ( (w == old_w) && (h == old_h) )
return;
return FALSE;
if (w != old_w)
libsaria::prefs::set("ocarina.window.w", w);
@ -47,6 +47,7 @@ static void configure(GtkWidget *widget, GdkEvent *event, gpointer data)
println("New (w,h): (%d, %d)", w, h);
gtk_window_resize(GTK_WINDOW(win), w, h);
return FALSE;
}
static void window_state(GtkWidget *widget, GdkEvent *event, gpointer data)