Lines Matching refs:csq

119 pending_rule_t *make_pending_rule(int fd, xcb_window_t win, rule_consequence_t *csq)  in make_pending_rule()  argument
126 pr->csq = csq; in make_pending_rule()
164 free(pr->csq); in remove_pending_rule()
197 if (csq->split_dir == NULL) { \
198 csq->split_dir = calloc(1, sizeof(direction_t)); \
200 *(csq->split_dir) = (val); \
205 if (csq->state == NULL) { \
206 csq->state = calloc(1, sizeof(client_state_t)); \
208 *(csq->state) = (val); \
213 if (csq->layer == NULL) { \
214 csq->layer = calloc(1, sizeof(stack_layer_t)); \
216 *(csq->layer) = (val); \
219 void _apply_window_type(xcb_window_t win, rule_consequence_t *csq) in _apply_window_type() argument
227 csq->focus = false; in _apply_window_type()
230 csq->center = true; in _apply_window_type()
234 csq->manage = false; in _apply_window_type()
244 void _apply_window_state(xcb_window_t win, rule_consequence_t *csq) in _apply_window_state() argument
257 csq->sticky = true; in _apply_window_state()
264 void _apply_transient(xcb_window_t win, rule_consequence_t *csq) in _apply_transient() argument
273 void _apply_hints(xcb_window_t win, rule_consequence_t *csq) in _apply_hints() argument
284 void _apply_class(xcb_window_t win, rule_consequence_t *csq) in _apply_class() argument
288 snprintf(csq->class_name, sizeof(csq->class_name), "%s", reply.class_name); in _apply_class()
289 snprintf(csq->instance_name, sizeof(csq->instance_name), "%s", reply.instance_name); in _apply_class()
294 void _apply_name(xcb_window_t win, rule_consequence_t *csq) in _apply_name() argument
298 snprintf(csq->name, sizeof(csq->name), "%s", reply.name); in _apply_name()
303 void parse_keys_values(char *buf, rule_consequence_t *csq) in parse_keys_values() argument
308 parse_key_value(key, value, csq); in parse_keys_values()
314 void apply_rules(xcb_window_t win, rule_consequence_t *csq) in apply_rules() argument
316 _apply_window_type(win, csq); in apply_rules()
317 _apply_window_state(win, csq); in apply_rules()
318 _apply_transient(win, csq); in apply_rules()
319 _apply_hints(win, csq); in apply_rules()
320 _apply_class(win, csq); in apply_rules()
321 _apply_name(win, csq); in apply_rules()
326 if ((streq(rule->class_name, MATCH_ANY) || streq(rule->class_name, csq->class_name)) && in apply_rules()
327 (streq(rule->instance_name, MATCH_ANY) || streq(rule->instance_name, csq->instance_name)) && in apply_rules()
328 (streq(rule->name, MATCH_ANY) || streq(rule->name, csq->name))) { in apply_rules()
331 parse_keys_values(effect, csq); in apply_rules()
341 bool schedule_rules(xcb_window_t win, rule_consequence_t *csq) in schedule_rules() argument
346 resolve_rule_consequence(csq); in schedule_rules()
360 print_rule_consequence(&csq_buf, csq); in schedule_rules()
363 …execl(external_rules_command, external_rules_command, wid, csq->class_name, csq->instance_name, cs… in schedule_rules()
368 pending_rule_t *pr = make_pending_rule(fds[0], win, csq); in schedule_rules()
374 void parse_rule_consequence(int fd, rule_consequence_t *csq) in parse_rule_consequence() argument
384 parse_keys_values(data, csq); in parse_rule_consequence()
388 void parse_key_value(char *key, char *value, rule_consequence_t *csq) in parse_key_value() argument
392 snprintf(csq->monitor_desc, sizeof(csq->monitor_desc), "%s", value); in parse_key_value()
394 snprintf(csq->desktop_desc, sizeof(csq->desktop_desc), "%s", value); in parse_key_value()
396 snprintf(csq->node_desc, sizeof(csq->node_desc), "%s", value); in parse_key_value()
415 csq->split_ratio = rat; in parse_key_value()
418 if (csq->rect == NULL) { in parse_key_value()
419 csq->rect = calloc(1, sizeof(xcb_rectangle_t)); in parse_key_value()
421 if (!parse_rectangle(value, csq->rect)) { in parse_key_value()
422 free(csq->rect); in parse_key_value()
423 csq->rect = NULL; in parse_key_value()
427 csq->hidden = v; in parse_key_value()
431 csq->name = v; \ in parse_key_value()