summaryrefslogtreecommitdiff
path: root/openbox/client.c
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2009-12-11 18:27:46 -0500
committerDana Jansens <danakj@orodu.net>2009-12-11 18:58:39 -0500
commit9ba2b04e96449fea5b6bd212aa3d431638754bdd (patch)
treecbe309179589ae66cb459e41dee911407df75b1c /openbox/client.c
parent5c01dc651a220ad1ccce9502da577d81f1877388 (diff)
Set hints that remember the WM_WINDOW_ROLE and WM_CLASS properties for our users.
The hints are _OB_ROLE, _OB_NAME, and _OB_CLASS.
Diffstat (limited to 'openbox/client.c')
-rw-r--r--openbox/client.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/openbox/client.c b/openbox/client.c
index fcbe7cd9..e3a7d6ec 100644
--- a/openbox/client.c
+++ b/openbox/client.c
@@ -76,6 +76,7 @@ static RrImage *client_default_icon = NULL;
static void client_get_all(ObClient *self, gboolean real);
static void client_get_startup_id(ObClient *self);
static void client_get_session_ids(ObClient *self);
+static void client_save_session_ids(ObClient *self);
static void client_get_area(ObClient *self);
static void client_get_desktop(ObClient *self);
static void client_get_state(ObClient *self);
@@ -1159,6 +1160,7 @@ static void client_get_all(ObClient *self, gboolean real)
/* get the session related properties, these can change decorations
from per-app settings */
client_get_session_ids(self);
+ client_save_session_ids(self);
/* now we got everything that can affect the decorations */
if (!real)
@@ -2367,6 +2369,15 @@ static void client_get_session_ids(ObClient *self)
}
}
+/*! Save the session IDs as seen by Openbox when the window mapped, so that
+ users can still access them later if the app changes them */
+static void client_save_session_ids(ObClient *self)
+{
+ PROP_SETS(self->window, ob_role, self->role);
+ PROP_SETS(self->window, ob_name, self->name);
+ PROP_SETS(self->window, ob_class, self->class);
+}
+
static void client_change_wm_state(ObClient *self)
{
gulong state[2];