Add workspace management functions.

This commit is contained in:
2026-09-10 14:51:21 +01:00
parent ac72396a0f
commit 6544ae5f23
8 changed files with 227 additions and 69 deletions
+15 -1
View File
@@ -20,9 +20,14 @@ let setup conn root =
Error.check conn cookie
let window_event_mask = 1 lsl 4
let substructure_mask = 1 lsl 19
let values_window =
CArray.of_list uint32_t [ Unsigned.UInt32.of_int window_event_mask ]
CArray.of_list uint32_t
[
Unsigned.UInt32.of_int window_event_mask;
Unsigned.UInt32.of_int substructure_mask;
]
let setup_window conn window =
let cookie =
@@ -106,6 +111,15 @@ let map conn window =
let cookie = _xcb_map_window conn window in
Error.check conn cookie
let _xcb_unmap_window =
foreign "xcb_unmap_window"
(ptr Types.Connection.typ @-> Types.Window.typ
@-> returning Types.Cookie.Void.typ)
let unmap conn window =
let cookie = _xcb_unmap_window conn window in
Error.check conn cookie
let _xcb_set_input_focus =
foreign "xcb_set_input_focus"
(ptr Types.Connection.typ @-> uint8_t @-> Types.Window.typ @-> uint32_t