the only use was to hold global state, which is now actually global
E7UO6NRGXFDMBU3BSJYRDNOA3Y7VHD7NWPHI5PHCPHQF6ZNOPZLQC
Z53RRSEGCT3PGEZNNSAREB3WVYOHCTDXXPNAKOWWGCEYW4G2QC4QC
S7RXJJZG4IEIVLPHEWFT5M2T3SRRO5US5SYBPXSYSWJJLXAKNNPAC
CN4FS77B6FLSEDGAQ4R5YGHS56TNW7IGUR7RK4HKCLDX2627VBKAC
7B74AT3BXYB7PVW4F6SGQNPMHOU5TEV5TZ54CG6VSQI46XSEKWXQC
D425ND7AT3F7QJ3CCSESMVDOC3J5C5P32M5SJDBHECZJXLHNQ2FAC
2ZRKX4A24W4WNSLJNPKP3FWB3Y3UCYLWWESTC65P45BQFSJKS4PQC
7XCGFU3GX4TQXZBOU7GFAQ62EEOTVRNWFYQGI3XULFPSUKDZ2EYAC
O5JVMDEEKP334BAYMJ6HHXROW4X4WC24JHCYZTKJRQE5UGYXV7YQC
struct dwl_server {
struct wl_display *wl_display;
struct wlr_backend *backend;
struct wlr_renderer *renderer;
struct wlr_xdg_shell *xdg_shell;
struct wl_listener new_xdg_surface;
struct wl_list views;
struct wlr_cursor *cursor;
struct wlr_xcursor_manager *cursor_mgr;
struct wl_listener cursor_motion;
struct wl_listener cursor_motion_absolute;
struct wl_listener cursor_button;
struct wl_listener cursor_axis;
struct wl_listener cursor_frame;
struct wlr_seat *seat;
struct wl_listener new_input;
struct wl_listener request_cursor;
struct wl_list keyboards;
unsigned int cursor_mode;
struct dwl_view *grabbed_view;
double grab_x, grab_y;
int grab_width, grab_height;
uint32_t resize_edges;
static struct dwl_server server;
static struct wl_display *wl_display;
static struct wlr_backend *backend;
static struct wlr_renderer *renderer;
static struct wlr_xdg_shell *xdg_shell;
static struct wl_listener new_xdg_surface;
static struct wl_list views;
static struct wlr_cursor *cursor;
static struct wlr_xcursor_manager *cursor_mgr;
static struct wl_listener cursor_motion;
static struct wl_listener cursor_motion_absolute;
static struct wl_listener cursor_button;
static struct wl_listener cursor_axis;
static struct wl_listener cursor_frame;
static struct wlr_seat *seat;
static struct wl_listener new_input;
static struct wl_listener request_cursor;
static struct wl_list keyboards;
static unsigned int cursor_mode;
static struct dwl_view *grabbed_view;
static double grab_x, grab_y;
static int grab_width, grab_height;
static uint32_t resize_edges;
static struct wlr_output_layout *output_layout;
static struct wl_list outputs;
static struct wl_listener new_output;
wl_list_init(&server.outputs);
server.new_output.notify = createoutput;
wl_signal_add(&server.backend->events.new_output, &server.new_output);
wl_list_init(&outputs);
new_output.notify = createoutput;
wl_signal_add(&backend->events.new_output, &new_output);
wl_list_init(&server.views);
server.xdg_shell = wlr_xdg_shell_create(server.wl_display);
server.new_xdg_surface.notify = createnotify;
wl_signal_add(&server.xdg_shell->events.new_surface,
&server.new_xdg_surface);
wl_list_init(&views);
xdg_shell = wlr_xdg_shell_create(wl_display);
new_xdg_surface.notify = createnotify;
wl_signal_add(&xdg_shell->events.new_surface,
&new_xdg_surface);
server.cursor_motion.notify = motionrelative;
wl_signal_add(&server.cursor->events.motion, &server.cursor_motion);
server.cursor_motion_absolute.notify = motionabsolute;
wl_signal_add(&server.cursor->events.motion_absolute,
&server.cursor_motion_absolute);
server.cursor_button.notify = buttonpress;
wl_signal_add(&server.cursor->events.button, &server.cursor_button);
server.cursor_axis.notify = axisnotify;
wl_signal_add(&server.cursor->events.axis, &server.cursor_axis);
server.cursor_frame.notify = cursorframe;
wl_signal_add(&server.cursor->events.frame, &server.cursor_frame);
cursor_motion.notify = motionrelative;
wl_signal_add(&cursor->events.motion, &cursor_motion);
cursor_motion_absolute.notify = motionabsolute;
wl_signal_add(&cursor->events.motion_absolute,
&cursor_motion_absolute);
cursor_button.notify = buttonpress;
wl_signal_add(&cursor->events.button, &cursor_button);
cursor_axis.notify = axisnotify;
wl_signal_add(&cursor->events.axis, &cursor_axis);
cursor_frame.notify = cursorframe;
wl_signal_add(&cursor->events.frame, &cursor_frame);
wl_list_init(&server.keyboards);
server.new_input.notify = inputdevice;
wl_signal_add(&server.backend->events.new_input, &server.new_input);
server.seat = wlr_seat_create(server.wl_display, "seat0");
server.request_cursor.notify = setcursor;
wl_signal_add(&server.seat->events.request_set_cursor,
&server.request_cursor);
wl_list_init(&keyboards);
new_input.notify = inputdevice;
wl_signal_add(&backend->events.new_input, &new_input);
seat = wlr_seat_create(wl_display, "seat0");
request_cursor.notify = setcursor;
wl_signal_add(&seat->events.request_set_cursor,
&request_cursor);