running = false;
}
+void cleanup(void)
+{
+ while (mon_head != NULL)
+ remove_monitor(mon_head);
+ while (rule_head != NULL)
+ remove_rule(rule_head);
+ free(frozen_pointer);
+}
+
void register_events(void)
{
uint32_t values[] = {ROOT_EVENT_MASK};
xcb_ewmh_set_supported(ewmh, default_screen, LENGTH(net_atoms), net_atoms);
- monitor_uid = desktop_uid = client_uid = 0;
+ monitor_uid = desktop_uid = client_uid = rule_uid = 0;
mon = last_mon = mon_head = mon_tail = NULL;
bool xinerama_is_active = false;
ewmh_update_number_of_desktops();
ewmh_update_desktop_names();
ewmh_update_current_desktop();
- rule_head = make_rule();
+ rule_head = rule_tail = NULL;
frozen_pointer = make_pointer_state();
get_pointer_position(&pointer_position);
+ last_entered = XCB_NONE;
split_mode = MODE_AUTOMATIC;
+ visible = true;
+ exit_status = 0;
}
int main(int argc, char *argv[])
}
}
+ cleanup();
close(sock_fd);
if (status_fifo != NULL)
fclose(status_fifo);
free(ewmh);
xcb_flush(dpy);
xcb_disconnect(dpy);
- return 0;
+ return exit_status;
}