#include "util.h"
static void client_destroy(Client *c);
-static Client *client_new(WebKitWebView *webview);
+static Client *client_new(WebKitWebView *webview, gboolean);
static gboolean input_clear(Client *c);
static void input_print(Client *c, gboolean force, MessageType type,
gboolean hide, const char *message);
} else if (arg->i == TARGET_NEW) {
spawn_new_instance(uri, TRUE);
} else { /* TARGET_RELATET */
- Client *newclient = client_new(c->webview);
+ Client *newclient = client_new(c->webview, FALSE);
/* Load the uri into the new client. */
webkit_web_view_load_uri(newclient->webview, uri);
set_title(c, uri);
* @webview: Related webview or NULL if a client with an independent
* webview shoudl be created.
*/
-static Client *client_new(WebKitWebView *webview)
+static Client *client_new(WebKitWebView *webview, gboolean show)
{
Client *c;
char *xid;
c->state.enable_register = TRUE;
- gtk_widget_show_all(c->window);
+ if (show) {
+ gtk_widget_show_all(c->window);
+ }
/* read the config file */
ex_run_file(c, vb.files[FILES_CONFIG]);
static WebKitWebView *on_webview_create(WebKitWebView *webview,
WebKitNavigationAction *navact, Client *c)
{
- Client *new = client_new(webview);
+ Client *new = client_new(webview, FALSE);
return new->webview;
}
*/
static void on_webview_ready_to_show(WebKitWebView *webview, Client *c)
{
- gtk_widget_show(GTK_WIDGET(webview));
+ gtk_widget_show_all(GTK_WIDGET(c->window));
}
/**
vb.embed = strtol(winid, NULL, 0);
}
- c = client_new(NULL);
+ c = client_new(NULL, TRUE);
if (argc <= 1) {
vb_load_uri(c, &(Arg){TARGET_CURRENT, NULL});
} else {