aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar Paul Colomiets <paul@colomiets.name>2011-07-02 19:05:31 +0300
committerGravatar Paul Colomiets <paul@colomiets.name>2011-07-02 19:05:31 +0300
commit1037a6371e2b8f4f111676851034193318a68726 (patch)
tree1b8b17c3fa9872eb1ef14a95539f0116ebf62d62 /src
parentcd54fab7778c11606e915d2eebceeba8bc9a46fa (diff)
Added window_role variable to set WM_WINDOW_ROLE
Another feature for easier integrating with window managers
Diffstat (limited to 'src')
-rw-r--r--src/callbacks.c6
-rw-r--r--src/callbacks.h3
-rw-r--r--src/uzbl-core.c1
-rw-r--r--src/uzbl-core.h1
4 files changed, 11 insertions, 0 deletions
diff --git a/src/callbacks.c b/src/callbacks.c
index 862f608..4c927bc 100644
--- a/src/callbacks.c
+++ b/src/callbacks.c
@@ -80,6 +80,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;
diff --git a/src/callbacks.h b/src/callbacks.h
index d34b9fa..654c116 100644
--- a/src/callbacks.h
+++ b/src/callbacks.h
@@ -22,6 +22,9 @@ void
set_icon();
void
+set_window_role();
+
+void
move_statusbar();
void
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;