窗口管理器状态机设计

This commit is contained in:
2025-11-10 23:20:12 +08:00
parent e77c986109
commit 79425dc890
16 changed files with 277 additions and 52 deletions

26
src/wm.h Normal file
View File

@@ -0,0 +1,26 @@
#pragma once
#include "types.h"
typedef struct wm_t {
bool need_restart;
GMainLoop *loop;
client_t *client_list;
client_t *client_stack_list;
client_t *client_focused;
monitor_t *monitor_list;
monitor_t *current_monitor;
xcb_connection_t *xcb_conn;
xcb_screen_t *screen;
int default_screen;
bool have_xfixes;
bool have_xinerama;
bool have_randr;
} wm_t;
extern wm_t wm;
void wm_restart(void);
void wm_quit(void);