diff --git a/data/rc.xml b/data/rc.xml
index 3e5554b..a9a7a35 100644
--- a/data/rc.xml
+++ b/data/rc.xml
@@ -734,6 +734,12 @@
true
# 'Horizontal', 'Vertical' or boolean (yes/no)
+
+
+ # set a particular window property
+ desktop
+ # window type, currently supported: 'desktop','dock'
+
# end of the example
diff --git a/data/rc.xsd b/data/rc.xsd
index c8f5638..dbefe7e 100644
--- a/data/rc.xsd
+++ b/data/rc.xsd
@@ -235,6 +235,11 @@
+
+
+
+
+
@@ -255,6 +260,7 @@
+
diff --git a/openbox/client.c b/openbox/client.c
index 3ff278a..25ecd4a 100644
--- a/openbox/client.c
+++ b/openbox/client.c
@@ -950,7 +950,7 @@ static ObAppSettings *client_get_settings_state(ObClient *self)
}
if (match) {
- ob_debug("Window matching: %s", app->name);
+ ob_debug("Window matching: %s", self->name);
/* copy the settings to our struct, overriding the existing
settings if they are not defaults */
@@ -958,6 +958,9 @@ static ObAppSettings *client_get_settings_state(ObClient *self)
}
}
+
+ if (settings->set_type != -1)
+ self->type = settings->set_type;
if (settings->shade != -1)
self->shaded = !!settings->shade;
if (settings->decor != -1)
@@ -1565,6 +1568,7 @@ void client_get_mwm_hints(ObClient *self)
}
}
+
void client_get_type_and_transientness(ObClient *self)
{
guint num, i;
diff --git a/openbox/config.c b/openbox/config.c
index dad5d1b..de9f84f 100644
--- a/openbox/config.c
+++ b/openbox/config.c
@@ -110,6 +110,7 @@ ObAppSettings* config_create_app_settings(void)
{
ObAppSettings *settings = g_slice_new0(ObAppSettings);
settings->type = -1;
+ settings->set_type = -1;
settings->decor = -1;
settings->shade = -1;
settings->monitor_type = OB_PLACE_MONITOR_ANY;
@@ -135,6 +136,7 @@ void config_app_settings_copy_non_defaults(const ObAppSettings *src,
g_assert(dst != NULL);
copy_if(type, (ObClientType)-1);
+ copy_if(set_type, -1);
copy_if(decor, -1);
copy_if(shade, -1);
copy_if(monitor_type, OB_PLACE_MONITOR_ANY);
@@ -254,6 +256,17 @@ static void parse_single_per_app_settings(xmlNodePtr app,
obt_xml_attr_bool(n, "force", &settings->pos_force);
}
+ if ((n = obt_xml_find_node(app->children, "set_window_property"))) {
+ if ((c = obt_xml_find_node(n->children, "type"))) {
+ gchar *s = obt_xml_node_string(c);
+ if (!g_ascii_strcasecmp(s, "desktop"))
+ settings->set_type = OB_CLIENT_TYPE_DESKTOP;
+ else if (!g_ascii_strcasecmp(s, "dock"))
+ settings->set_type = OB_CLIENT_TYPE_DOCK;
+ g_free(s);
+ }
+ }
+
if ((n = obt_xml_find_node(app->children, "size"))) {
if ((c = obt_xml_find_node(n->children, "width"))) {
if (!obt_xml_node_contains(c, "default")) {
diff --git a/openbox/config.h b/openbox/config.h
index 96a66cf..5a694c0 100644
--- a/openbox/config.h
+++ b/openbox/config.h
@@ -42,6 +42,7 @@ struct _ObAppSettings
GPatternSpec *group_name;
GPatternSpec *title;
ObClientType type;
+ ObClientType set_type;
GravityPoint position;
gboolean pos_given;