Keep xid generation and setting to env close together.
authorDaniel Carl <danielcarl@gmx.de>
Tue, 13 Jun 2017 20:41:27 +0000 (22:41 +0200)
committerDaniel Carl <danielcarl@gmx.de>
Tue, 13 Jun 2017 20:41:27 +0000 (22:41 +0200)
src/main.c

index 7586f0c..5d01268 100644 (file)
@@ -683,6 +683,10 @@ static Client *client_new(WebKitWebView *webview, gboolean show)
                 (int)GDK_WINDOW_XID(gtk_widget_get_window(GTK_WIDGET(c->window))));
     }
 
+    /* set the x window id to env */
+    g_setenv("VIMB_XID", xid, TRUE);
+    g_free(xid);
+
     completion_init(c);
     map_init(c);
 
@@ -736,10 +740,6 @@ static Client *client_new(WebKitWebView *webview, gboolean show)
             GTK_STYLE_PROVIDER(vb.style_provider),
             GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
 
-    /* set the x window id to env */
-    g_setenv("VIMB_XID", xid, TRUE);
-    g_free(xid);
-
     /* initialize the settings */
     setting_init(c);