From: Daniel Carl Date: Tue, 13 Jun 2017 20:22:19 +0000 (+0200) Subject: Don't set window size if embedded #417. X-Git-Url: https://git.owens.tech/editable-focus.html/editable-focus.html/git?a=commitdiff_plain;h=0dde6882c440379347ad05018610ac370cde8f62;p=vimb.git Don't set window size if embedded #417. In case vimb is embedded the window size is determined by the embedding application. Setting the default window size in this case caused screen redraw issue so that statusbar was not updated properly. --- diff --git a/src/main.c b/src/main.c index 1241c5b..7586f0c 100644 --- a/src/main.c +++ b/src/main.c @@ -677,13 +677,12 @@ static Client *client_new(WebKitWebView *webview, gboolean show) * widget is realized. */ gtk_widget_get_preferred_size(GTK_WIDGET(c->window), &req, NULL); gtk_widget_realize(GTK_WIDGET(c->window)); + gtk_window_set_default_size(GTK_WINDOW(c->window), WIN_WIDTH, WIN_HEIGHT); xid = g_strdup_printf("%d", (int)GDK_WINDOW_XID(gtk_widget_get_window(GTK_WIDGET(c->window)))); } - gtk_window_set_default_size(GTK_WINDOW(c->window), WIN_WIDTH, WIN_HEIGHT); - completion_init(c); map_init(c);