处理 clientmessage 事件和全屏窗口

This commit is contained in:
2025-08-26 00:42:19 +08:00
parent b28c9cd58b
commit f225dc7011
8 changed files with 104 additions and 7 deletions

View File

@@ -323,3 +323,10 @@ void kill_window(xcb_window_t window) {
xcb_flush(conn);
xcb_ungrab_server(conn);
}
void set_window_fullscreen_state(xcb_window_t window, bool fullscreen) {
xcb_atom_t atom = fullscreen ? ewmh->_NET_WM_STATE_FULLSCREEN : 0;
uint32_t data_len = fullscreen ? 1 : 0;
xcb_change_property(conn, XCB_PROP_MODE_REPLACE, window, atom,
XCB_ATOM_WINDOW, 32, data_len, &atom);
}