rule PATTERN floating
Make a new rule that will float the windows whose class name or instance name equals PATTERN.
+ adopt_orphans
+ Manage all the unmanaged windows remaining from a previous session.
+
reload_autostart
Reload the autostart file.
.BI rule " PATTERN floating "
Make a new rule that will float the windows whose class name or instance name equals PATTERN.
.TP
+.BI adopt_orphans
+Manage all the unmanaged windows remaining from a previous session.
+.TP
.BI reload_autostart
Reload the autostart file.
.TP
xcb_ungrab_button(dpy, XCB_BUTTON_INDEX_3, screen->root, button_modifier);
}
-void adopt_orphans(void)
-{
- xcb_query_tree_reply_t *qtr = xcb_query_tree_reply(dpy, xcb_query_tree(dpy, screen->root), NULL);
- if (qtr == NULL)
- return;
- int len = xcb_query_tree_children_length(qtr);
- xcb_window_t *wins = xcb_query_tree_children(qtr);
- for (int i = 0; i < len; i++) {
- uint32_t d;
- xcb_window_t win = wins[i];
- if (xcb_ewmh_get_wm_desktop_reply(ewmh, xcb_ewmh_get_wm_desktop(ewmh, win), &d, NULL) == 1)
- manage_window(win);
- }
- free(qtr);
-}
-
void setup(void)
{
ewmh_init();
run_autostart();
grab_buttons();
ewmh_update_wm_name();
- adopt_orphans();
while (running) {
}
if (mon->desk->layout == LAYOUT_TILED)
return;
+ } else if (strcmp(cmd, "adopt_orphans") == 0) {
+ adopt_orphans();
} else if (strcmp(cmd, "reload") == 0) {
load_settings();
run_autostart();
ewmh_update_client_list();
}
+void adopt_orphans(void)
+{
+ xcb_query_tree_reply_t *qtr = xcb_query_tree_reply(dpy, xcb_query_tree(dpy, screen->root), NULL);
+ if (qtr == NULL)
+ return;
+ int len = xcb_query_tree_children_length(qtr);
+ xcb_window_t *wins = xcb_query_tree_children(qtr);
+ for (int i = 0; i < len; i++) {
+ uint32_t d;
+ xcb_window_t win = wins[i];
+ if (xcb_ewmh_get_wm_desktop_reply(ewmh, xcb_ewmh_get_wm_desktop(ewmh, win), &d, NULL) == 1)
+ manage_window(win);
+ }
+ free(qtr);
+}
+
void window_draw_border(node_t *n, bool focused_window, bool focused_monitor)
{
if (n == NULL)
bool locate_window(xcb_window_t, window_location_t *);
bool locate_desktop(char *, desktop_location_t *);
void manage_window(xcb_window_t);
+void adopt_orphans(void);
void window_draw_border(node_t *, bool, bool);
void window_close(node_t *);
void window_kill(desktop_t *, node_t *);