changing the cursor while grabbing the keyboard
This commit is contained in:
parent
5d6fdb0c0f
commit
ad3632dff6
|
@ -119,11 +119,12 @@
|
||||||
(if (or (null? (cdr dones))
|
(if (or (null? (cdr dones))
|
||||||
(key-grab:override? (car dones)))
|
(key-grab:override? (car dones)))
|
||||||
(car dones)
|
(car dones)
|
||||||
(loop (cdr dones)))))))))
|
(loop (cdr dones))))))))
|
||||||
|
(cursor (create-font-cursor dpy xc-icon))) ;; options?
|
||||||
(grab-keyboard dpy (default-root-window dpy) #f
|
(grab-keyboard dpy (default-root-window dpy) #f
|
||||||
(grab-mode async) (grab-mode async) ;; ??
|
(grab-mode async) (grab-mode async) ;; ??
|
||||||
(key-event-time event))
|
(key-event-time event))
|
||||||
;; Cursor ?
|
(define-cursor dpy (default-root-window dpy) cursor)
|
||||||
(let ((result
|
(let ((result
|
||||||
(call-with-event-channel
|
(call-with-event-channel
|
||||||
dpy (default-root-window dpy) (event-mask key-press)
|
dpy (default-root-window dpy) (event-mask key-press)
|
||||||
|
@ -150,5 +151,7 @@
|
||||||
(cdr (cdr grab-rest))))
|
(cdr (cdr grab-rest))))
|
||||||
rest))))
|
rest))))
|
||||||
(else (loop grabs-rests)))))))))))
|
(else (loop grabs-rests)))))))))))
|
||||||
|
(undefine-cursor dpy (default-root-window dpy))
|
||||||
|
(free-cursor dpy cursor)
|
||||||
(ungrab-keyboard dpy current-time)
|
(ungrab-keyboard dpy current-time)
|
||||||
result)))
|
result)))
|
||||||
|
|
Loading…
Reference in New Issue