From 1037a6371e2b8f4f111676851034193318a68726 Mon Sep 17 00:00:00 2001 From: Paul Colomiets Date: Sat, 2 Jul 2011 19:05:31 +0300 Subject: Added window_role variable to set WM_WINDOW_ROLE Another feature for easier integrating with window managers --- src/callbacks.c | 6 ++++++ src/callbacks.h | 3 +++ src/uzbl-core.c | 1 + src/uzbl-core.h | 1 + 4 files changed, 11 insertions(+) (limited to 'src') diff --git a/src/callbacks.c b/src/callbacks.c index 862f608..4c927bc 100644 --- a/src/callbacks.c +++ b/src/callbacks.c @@ -79,6 +79,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; diff --git a/src/callbacks.h b/src/callbacks.h index d34b9fa..654c116 100644 --- a/src/callbacks.h +++ b/src/callbacks.h @@ -21,6 +21,9 @@ set_status_background(); void set_icon(); +void +set_window_role(); + void move_statusbar(); diff --git a/src/uzbl-core.c b/src/uzbl-core.c index 91729f9..0b43df9 100644 --- a/src/uzbl-core.c +++ b/src/uzbl-core.c @@ -91,6 +91,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)}, diff --git a/src/uzbl-core.h b/src/uzbl-core.h index affd334..4d7a9b8 100644 --- a/src/uzbl-core.h +++ b/src/uzbl-core.h @@ -77,6 +77,7 @@ typedef struct { WebKitWebView* web_view; gchar* main_title; gchar* icon; + gchar* window_role; /* WebInspector */ GtkWidget* inspector_window; -- cgit v1.2.3