diff options
author | Brendan Taylor <whateley@gmail.com> | 2011-07-12 21:32:50 +0000 |
---|---|---|
committer | Brendan Taylor <whateley@gmail.com> | 2011-07-12 21:39:35 +0000 |
commit | 44e34a87ca6fc496d9c0a55a40dec98be27d52f6 (patch) | |
tree | 8e1dc09ab7516ab2617b1df7f1ddb243857056de /src/uzbl-core.c | |
parent | fc9604fa60645fe7c6129a76bee273bb501b88e6 (diff) | |
parent | c08cce6f0a92c42c71da012dd38b9f54078a0b06 (diff) |
Merge branch 'tailhook/wm-integ' into experimental
Conflicts:
src/callbacks.c
src/callbacks.h
src/uzbl-core.c
Diffstat (limited to 'src/uzbl-core.c')
-rw-r--r-- | src/uzbl-core.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/src/uzbl-core.c b/src/uzbl-core.c index 4965d8f..22a0dda 100644 --- a/src/uzbl-core.c +++ b/src/uzbl-core.c @@ -883,7 +883,7 @@ settings_init () { State* s = &uzbl.state; Network* n = &uzbl.net; int i; - + /* Load default config */ for (i = 0; default_config[i].command != NULL; i++) { parse_cmd_line(default_config[i].command, NULL); @@ -1082,7 +1082,6 @@ main (int argc, char* argv[]) { if (uzbl.state.plug_mode) { uzbl.gui.plug = create_plug(); gtk_container_add (GTK_CONTAINER (uzbl.gui.plug), uzbl.gui.vbox); - gtk_widget_show_all (GTK_WIDGET (uzbl.gui.plug)); /* in xembed mode the window has no unique id and thus * socket/fifo names aren't unique either. * we use a custom randomizer to create a random id @@ -1092,12 +1091,13 @@ main (int argc, char* argv[]) { srand((unsigned int)tv.tv_sec*tv.tv_usec); uzbl.xwin = rand(); } - + /* Windowed mode */ else { uzbl.gui.main_window = create_window(); gtk_container_add (GTK_CONTAINER (uzbl.gui.main_window), uzbl.gui.vbox); - gtk_widget_show_all (uzbl.gui.main_window); + /* We need to ensure there is a window, before we can get XID */ + gtk_widget_realize (GTK_WIDGET (uzbl.gui.main_window)); uzbl.xwin = GDK_WINDOW_XID (gtk_widget_get_window (GTK_WIDGET (uzbl.gui.main_window))); @@ -1172,6 +1172,13 @@ main (int argc, char* argv[]) { g_free(uri_override); } + /* Finally show the window */ + if (uzbl.gui.main_window) { + gtk_widget_show_all (uzbl.gui.main_window); + } else { + gtk_widget_show_all (GTK_WIDGET (uzbl.gui.plug)); + } + /* Verbose feedback */ if (uzbl.state.verbose) { printf("Uzbl start location: %s\n", argv[0]); |