fixed take-focus
This commit is contained in:
parent
42a49bfd15
commit
8b5667a188
|
@ -288,23 +288,12 @@
|
|||
(wm-take-focus (intern-atom dpy "WM_TAKE_FOCUS" #f))
|
||||
(wm-hints (get-wm-hints dpy window))
|
||||
(t (and wm-hints (assq (wm-hint input?) wm-hints)))
|
||||
(input? (if t (cdr t) #t)))
|
||||
(let ((type (if (not (and protocols wm-take-focus
|
||||
(memq wm-take-focus protocols)))
|
||||
(if input?
|
||||
'passive
|
||||
'no-input)
|
||||
(if input?
|
||||
'locally-active
|
||||
'globally-active))))
|
||||
;; we use passive as the default (with no hints at all)
|
||||
(case type
|
||||
((passive)
|
||||
(set-input-focus dpy window (revert-to parent) time)) ;; ??
|
||||
((globally-active) #t)
|
||||
((locally-active)
|
||||
(send-protocol-message dpy window wm-take-focus time))
|
||||
((no-focus) #f)))))
|
||||
(input? (if t (cdr t) #f)))
|
||||
(if input?
|
||||
(set-input-focus dpy window (revert-to parent) time))
|
||||
(if (and protocols wm-take-focus
|
||||
(memq wm-take-focus protocols))
|
||||
(send-protocol-message dpy window wm-take-focus time))))
|
||||
|
||||
(define (send-protocol-message dpy window atom time)
|
||||
(send-event dpy window #f (event-mask)
|
||||
|
|
Loading…
Reference in New Issue