diff options
| author | Dana Jansens <danakj@orodu.net> | 2010-01-11 13:42:50 -0500 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2010-01-11 13:42:50 -0500 |
| commit | 91af4d5bc9e04b766735aaa3ac098233ba103959 (patch) | |
| tree | ed9bff5f878eeeac6c3cd9844b0d9c54214ff614 /openbox/client.c | |
| parent | b8e994e837d260860a4dc0a1ee3a680e2cdfc75a (diff) | |
Add _OB_VERSION and _OB_APP_ROLE/CLASS/NAME/TYPE
Add _OB_VERSION property on the root window.
Change _OB_ROLE/CLASS/NAME to _OB_APP_*.
Add _OB_APP_TYPE which has a string for the type chosen for the window on
mapping by Openbox.
Adjust the rc.xml to match these changes.
Diffstat (limited to 'openbox/client.c')
| -rw-r--r-- | openbox/client.c | 41 |
1 files changed, 33 insertions, 8 deletions
diff --git a/openbox/client.c b/openbox/client.c index ae87ff0b..6799654e 100644 --- a/openbox/client.c +++ b/openbox/client.c @@ -76,7 +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_save_app_rule_values(ObClient *self); static void client_get_area(ObClient *self); static void client_get_desktop(ObClient *self); static void client_get_state(ObClient *self); @@ -1163,7 +1163,9 @@ 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); + + /* save the values of the variables used for app rule matching */ + client_save_app_rule_values(self); /* now we got everything that can affect the decorations */ if (!real) @@ -2372,13 +2374,36 @@ 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) +/*! Save the properties used for app matching rules, 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_app_rule_values(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); + const gchar *type; + + PROP_SETS(self->window, ob_app_role, self->role); + PROP_SETS(self->window, ob_app_name, self->name); + PROP_SETS(self->window, ob_app_class, self->class); + + switch (self->type) { + case OB_CLIENT_TYPE_NORMAL: + type = "normal"; break; + case OB_CLIENT_TYPE_DIALOG: + type = "dialog"; break; + case OB_CLIENT_TYPE_UTILITY: + type = "utility"; break; + case OB_CLIENT_TYPE_MENU: + type = "menu"; break; + case OB_CLIENT_TYPE_TOOLBAR: + type = "toolbar"; break; + case OB_CLIENT_TYPE_SPLASH: + type = "splash"; break; + case OB_CLIENT_TYPE_DESKTOP: + type = "desktop"; break; + case OB_CLIENT_TYPE_DOCK: + type = "dock"; break; + } + PROP_SETS(self->window, ob_app_type, type); } static void client_change_wm_state(ObClient *self) |
