diff --git a/src/drag-window.scm b/src/drag-window.scm index e4ec27a..70d29e5 100644 --- a/src/drag-window.scm +++ b/src/drag-window.scm @@ -34,7 +34,8 @@ (fill-style (fill-style tiled)) (fill-rule (fill-rule even-odd)))))) (set-window-override-redirect! dpy window #t) - (spawn* (lambda (release) + (spawn* (list 'drag-window window dwindow) + (lambda (release) (call-with-event-channel dpy window (event-mask exposure structure-notify) (lambda (channel) @@ -64,6 +65,7 @@ (define (install-dragging-control channel dpy click-window dragged-window) (spawn* + (list 'dragging-control click-window dragged-window) (lambda (release) (call-with-event-channel dpy click-window diff --git a/src/key-grab.scm b/src/key-grab.scm index 2c16969..bc733b3 100644 --- a/src/key-grab.scm +++ b/src/key-grab.scm @@ -9,8 +9,10 @@ (define (create-grab-server dpy) (let ((in-channel (make-channel))) - (spawn - (lambda () + (spawn* + 'grab-server + (lambda (release) + (release) (let ((grabs '()) (event-cache '())) (let loop () @@ -23,7 +25,8 @@ (grab-key dpy (key:keycode first) (key:modifiers first) (key-grab:window key-grab) #f (grab-mode async) (grab-mode async)) - (spawn* (lambda (resume) + (spawn* (list 'grabber 'on (key-grab:window key-grab)) + (lambda (resume) (call-with-event-channel dpy (key-grab:window key-grab) (event-mask key-press structure-notify)