X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fopenbox;a=blobdiff_plain;f=openbox%2Fclient.c;fp=openbox%2Fclient.c;h=914b3ae35845a8ac5c9c3b93dcb8e8fc09d82a7d;hp=1478d840f832265471d208fac1fead0b3199ec64;hb=d67b818ae90c5574166d08422d3e9a68d8d65e16;hpb=9325c92056ff4268db2263cdf8c07bb529e158aa diff --git a/openbox/client.c b/openbox/client.c index 1478d840..914b3ae3 100644 --- a/openbox/client.c +++ b/openbox/client.c @@ -218,7 +218,7 @@ void client_manage(Window window, ObPrompt *prompt) Time launch_time; guint32 user_time; gboolean obplaced; - gulong ignore_start; + gulong ignore_start = FALSE; ob_debug("Managing window: 0x%lx", window); @@ -2463,20 +2463,10 @@ static void client_get_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) +const gchar *client_type_to_string(ObClient *self) { const gchar *type; - OBT_PROP_SETS(self->window, OB_APP_ROLE, self->role); - OBT_PROP_SETS(self->window, OB_APP_NAME, self->name); - OBT_PROP_SETS(self->window, OB_APP_CLASS, self->class); - OBT_PROP_SETS(self->window, OB_APP_GROUP_NAME, self->group_name); - OBT_PROP_SETS(self->window, OB_APP_GROUP_CLASS, self->group_class); - OBT_PROP_SETS(self->window, OB_APP_TITLE, self->original_title); - switch (self->type) { case OB_CLIENT_TYPE_NORMAL: type = "normal"; break; @@ -2495,7 +2485,23 @@ static void client_save_app_rule_values(ObClient *self) case OB_CLIENT_TYPE_DOCK: type = "dock"; break; } - OBT_PROP_SETS(self->window, OB_APP_TYPE, type); + + return type; +} + +/*! 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) +{ + OBT_PROP_SETS(self->window, OB_APP_ROLE, self->role); + OBT_PROP_SETS(self->window, OB_APP_NAME, self->name); + OBT_PROP_SETS(self->window, OB_APP_CLASS, self->class); + OBT_PROP_SETS(self->window, OB_APP_GROUP_NAME, self->group_name); + OBT_PROP_SETS(self->window, OB_APP_GROUP_CLASS, self->group_class); + OBT_PROP_SETS(self->window, OB_APP_TITLE, self->original_title); + + OBT_PROP_SETS(self->window, OB_APP_TYPE, client_type_to_string(self)); } static void client_change_wm_state(ObClient *self)