事件适配器
This commit is contained in:
@@ -2,7 +2,6 @@
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <xcb/xcb.h>
|
||||
@@ -21,6 +20,7 @@
|
||||
|
||||
xcb_connection_t *conn = NULL;
|
||||
xcb_screen_t *screen = NULL;
|
||||
xcb_key_symbols_t *key_symbols = NULL;
|
||||
|
||||
bool has_other_wm_running(void) {
|
||||
conn = xcb_connect(NULL, NULL);
|
||||
@@ -276,16 +276,6 @@ void free_window_list(window_list_t *window_list) {
|
||||
free(window_list);
|
||||
}
|
||||
|
||||
void start_xcb_event_loop(void) {
|
||||
xcb_generic_event_t *event = NULL;
|
||||
while ((event = xcb_poll_for_event(conn)) != NULL) {
|
||||
uint8_t event_type = XCB_EVENT_RESPONSE_TYPE(event);
|
||||
const char *label = xcb_event_get_label(event_type);
|
||||
printf("================== %s ==================\n", label);
|
||||
free(event);
|
||||
}
|
||||
}
|
||||
|
||||
void clean_xcb(void) {
|
||||
clean_xcb_cursor();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user