return false;
}
-void handle_rules(xcb_window_t win, bool *floating, bool *transient, bool *fullscreen, bool *takes_focus, desktop_t **send_to)
+void handle_rules(xcb_window_t win, monitor_t **m, desktop_t **d, bool *floating, bool *transient, bool *fullscreen, bool *takes_focus, bool *manage)
{
xcb_ewmh_get_atoms_reply_t win_type;
*takes_focus = false;
} else if (a == ewmh->_NET_WM_WINDOW_TYPE_DIALOG) {
*floating = true;
+ } else if (a == ewmh->_NET_WM_WINDOW_TYPE_DOCK || a == ewmh->_NET_WM_WINDOW_TYPE_NOTIFICATION) {
+ *manage = false;
}
}
xcb_ewmh_get_atoms_reply_wipe(&win_type);
}
+ xcb_size_hints_t size_hints;
+
+ if (xcb_icccm_get_wm_normal_hints_reply(dpy, xcb_icccm_get_wm_normal_hints(dpy, win), &size_hints, NULL) == 1) {
+ if (size_hints.min_width > 0 && size_hints.min_height > 0
+ && size_hints.min_width == size_hints.max_width
+ && size_hints.min_height == size_hints.max_height)
+ *floating = true;
+ }
+
xcb_ewmh_get_atoms_reply_t win_state;
if (xcb_ewmh_get_wm_state_reply(ewmh, xcb_ewmh_get_wm_state(ewmh, win), &win_state, NULL) == 1) {
while (rule != NULL) {
if (is_match(rule, win)) {
- if (rule->effect.floating)
+ rule_effect_t efc = rule->effect;
+ if (efc.floating)
*floating = true;
- if (rule->effect.send_to != NULL) {
- *send_to = rule->effect.send_to;
- rule->effect.send_to = NULL; /* serve only once */
+ if (efc.monitor != NULL && efc.desktop != NULL) {
+ *m = efc.monitor;
+ *d = efc.desktop;
}
}
rule = rule->next;