aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/uzbl-core.c
diff options
context:
space:
mode:
authorGravatar Brendan Taylor <whateley@gmail.com>2011-04-24 00:48:53 -0600
committerGravatar Brendan Taylor <whateley@gmail.com>2011-04-24 00:48:53 -0600
commitd0b919ed5fb7fd42f6f4851443790e5c87116128 (patch)
treeac49cba1a9c4962f3c1215aa950cd4eafd4e876d /src/uzbl-core.c
parent169f53f110ca096d78c986402b5f9237924b8fbc (diff)
allow processes other than uzbl-tabbed to start uzbl-browser instances that appear in -tabbed
not entirely sure that this is useful yet.
Diffstat (limited to 'src/uzbl-core.c')
-rw-r--r--src/uzbl-core.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/uzbl-core.c b/src/uzbl-core.c
index c095a7f..e461a4c 100644
--- a/src/uzbl-core.c
+++ b/src/uzbl-core.c
@@ -51,8 +51,11 @@ GOptionEntry entries[] = {
"Name of the current instance (defaults to Xorg window id or random for GtkSocket mode)", "NAME" },
{ "config", 'c', 0, G_OPTION_ARG_STRING, &uzbl.state.config_file,
"Path to config file or '-' for stdin", "FILE" },
+ /* TODO: explain the difference between these two options */
{ "socket", 's', 0, G_OPTION_ARG_INT, &uzbl.state.socket_id,
- "Xembed Socket ID", "SOCKET" },
+ "Xembed socket ID, this window should embed itself", "SOCKET" },
+ { "embed", 'e', 0, G_OPTION_ARG_NONE, &uzbl.state.embed,
+ "Whether this window should expect to be embedded", NULL },
{ "connect-socket", 0, 0, G_OPTION_ARG_STRING_ARRAY, &uzbl.state.connect_socket_names,
"Connect to server socket for event managing", "CSOCKET" },
{ "print-events", 'p', 0, G_OPTION_ARG_NONE, &uzbl.state.events_stdout,
@@ -1540,6 +1543,7 @@ create_window() {
GtkPlug*
create_plug() {
+ if(uzbl.state.embed) uzbl.state.socket_id = 0;
GtkPlug* plug = GTK_PLUG (gtk_plug_new (uzbl.state.socket_id));
g_signal_connect (G_OBJECT (plug), "destroy", G_CALLBACK (destroy_cb), NULL);
g_signal_connect (G_OBJECT (plug), "key-press-event", G_CALLBACK (key_press_cb), NULL);
@@ -1746,7 +1750,7 @@ initialize(int argc, char** argv) {
}
/* Embedded mode */
- if (uzbl.state.socket_id)
+ if (uzbl.state.socket_id || uzbl.state.embed)
uzbl.state.plug_mode = TRUE;
if (!g_thread_supported())