aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/variables.c
diff options
context:
space:
mode:
authorGravatar Brendan Taylor <whateley@gmail.com>2011-07-12 21:32:50 +0000
committerGravatar Brendan Taylor <whateley@gmail.com>2011-07-12 21:39:35 +0000
commit44e34a87ca6fc496d9c0a55a40dec98be27d52f6 (patch)
tree8e1dc09ab7516ab2617b1df7f1ddb243857056de /src/variables.c
parentfc9604fa60645fe7c6129a76bee273bb501b88e6 (diff)
parentc08cce6f0a92c42c71da012dd38b9f54078a0b06 (diff)
Merge branch 'tailhook/wm-integ' into experimental
Conflicts: src/callbacks.c src/callbacks.h src/uzbl-core.c
Diffstat (limited to 'src/variables.c')
-rw-r--r--src/variables.c33
1 files changed, 29 insertions, 4 deletions
diff --git a/src/variables.c b/src/variables.c
index 5b717d9..529a850 100644
--- a/src/variables.c
+++ b/src/variables.c
@@ -45,6 +45,7 @@ const struct var_name_to_ptr_t {
{ "title_format_long", PTR_V_STR(uzbl.behave.title_format_long, 1, NULL)},
{ "title_format_short", PTR_V_STR(uzbl.behave.title_format_short, 1, NULL)},
{ "icon", PTR_V_STR(uzbl.gui.icon, 1, set_icon)},
+ { "window_role", PTR_V_STR(uzbl.gui.window_role, 1, set_window_role)},
{ "forward_keys", PTR_V_INT(uzbl.behave.forward_keys, 1, NULL)},
{ "authentication_handler", PTR_V_STR(uzbl.behave.authentication_handler, 1, set_authentication_handler)},
{ "scheme_handler", PTR_V_STR(uzbl.behave.scheme_handler, 1, NULL)},
@@ -277,11 +278,20 @@ view_settings() {
void
uri_change_cb (WebKitWebView *web_view, GParamSpec param_spec) {
- (void) param_spec;
+ (void) param_spec;
- g_free (uzbl.state.uri);
- g_object_get (web_view, "uri", &uzbl.state.uri, NULL);
- g_setenv("UZBL_URI", uzbl.state.uri, TRUE);
+ g_free (uzbl.state.uri);
+ g_object_get (web_view, "uri", &uzbl.state.uri, NULL);
+ g_setenv("UZBL_URI", uzbl.state.uri, TRUE);
+
+ gdk_property_change(
+ gtk_widget_get_window (GTK_WIDGET (uzbl.gui.main_window)),
+ gdk_atom_intern_static_string("UZBL_URI"),
+ gdk_atom_intern_static_string("STRING"),
+ 8,
+ GDK_PROP_MODE_REPLACE,
+ (unsigned char *)uzbl.state.uri,
+ strlen(uzbl.state.uri));
}
void
@@ -330,6 +340,15 @@ cmd_load_uri() {
soup_uri_free(soup_uri);
}
+ gdk_property_change(
+ gtk_widget_get_window (GTK_WIDGET (uzbl.gui.main_window)),
+ gdk_atom_intern_static_string("UZBL_URI"),
+ gdk_atom_intern_static_string("STRING"),
+ 8,
+ GDK_PROP_MODE_REPLACE,
+ (unsigned char *)newuri,
+ strlen(newuri));
+
webkit_web_view_load_uri (uzbl.gui.web_view, newuri);
g_free (newuri);
}
@@ -479,6 +498,12 @@ set_icon() {
}
void
+set_window_role() {
+ if (uzbl.gui.main_window)
+ gtk_window_set_role(GTK_WINDOW (uzbl.gui.main_window), uzbl.gui.window_role);
+}
+
+void
cmd_set_geometry() {
int ret=0, x=0, y=0;
unsigned int w=0, h=0;