From f5cb5e5cf8a3b410a4afda52f925e84432ca2ac8 Mon Sep 17 00:00:00 2001 From: Samuel Fadel Date: Sun, 4 Dec 2022 12:32:13 +0100 Subject: Key grabbing, handling outputs, init clients. * main.scm: Added key press handler * wm.scm: Added key press handler * schewm.c: Added key grabbing, output management, client initialization (initial grab) --- wm.scm | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'wm.scm') diff --git a/wm.scm b/wm.scm index 06d1581..85a23f4 100644 --- a/wm.scm +++ b/wm.scm @@ -1,7 +1,7 @@ (define-module (wm) #:use-module (system foreign) #:export (wm-init - wm-set-configure-notify-handler! + wm-set-key-press-handler! wm-run wm-quit)) @@ -28,14 +28,16 @@ (define wm-run (schewm-func void "wm_run" '())) -(define c/wm-set-configure-notify-handler +(define c/wm-set-key-press-handler (schewm-func void - "wm_set_configure_notify_handler" + "wm_set_key_press_handler" (list '*))) -(define (wm-set-configure-notify-handler! handler) - (c/wm-set-configure-notify-handler +(define (wm-set-key-press-handler! handler) + ;; mod (state, uint16) + ;; keysym (detail, uint8) + (c/wm-set-key-press-handler (procedure->pointer void handler - (list int16 int16 uint32 uint32)))) + (list uint16 uint8)))) -- cgit v1.2.3