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:
parent
4448ba7ce1
commit
ecd9a28add
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue