Ignore the next enter-notify after changing the workspace.
This commit is contained in:
parent
2928e57803
commit
adc01826f2
|
@ -424,7 +424,12 @@
|
|||
(window-exists? dpy (client:window client))
|
||||
(not (eq? client (wm-current-client wm)))
|
||||
(not (window-contains-focus? dpy (client:window client))))
|
||||
(wm-select-client wm client (crossing-event-time xevent))))
|
||||
(if (ignore-next-enter-notify?)
|
||||
(begin
|
||||
(accept-next-enter-notify!)
|
||||
(if (not (wm-current-client wm))
|
||||
(wm-select-client wm client (crossing-event-time xevent))))
|
||||
(wm-select-client wm client (crossing-event-time xevent)))))
|
||||
|
||||
((eq? (event-type button-press) type)
|
||||
(if (memq 'click (get-option-value (wm:options wm) 'focus-policy))
|
||||
|
@ -503,6 +508,19 @@
|
|||
(get-transient-for (wm:dpy wm) (client:window c)))))
|
||||
(wm:clients wm)))
|
||||
|
||||
;; ignoring the next enter-notify
|
||||
(define (ignore-next-enter-notify!)
|
||||
(set! *ignore-next-enter-notify* #t))
|
||||
|
||||
(define (ignore-next-enter-notify?)
|
||||
*ignore-next-enter-notify*)
|
||||
|
||||
(define *ignore-next-enter-notify* #f)
|
||||
|
||||
(define (accept-next-enter-notify!)
|
||||
(set! *ignore-next-enter-notify* #f))
|
||||
|
||||
|
||||
;; *** client names **************************************************
|
||||
|
||||
(define *client-names* '()) ;; (window oname name)
|
||||
|
|
|
@ -97,10 +97,11 @@
|
|||
(manager-type :syntax) manager-types manager-type-name
|
||||
create-wm destroy-wm
|
||||
wm-clients wm-current-client
|
||||
|
||||
wm-manage-window wm-unmanage-window wm-select-client
|
||||
wm-configure-window wm-iconify-window wm-maximize-window
|
||||
|
||||
ignore-next-enter-notify!
|
||||
|
||||
client? client:window client:client-window
|
||||
client:data set-client:data!
|
||||
client-name find-window-by-name get-all-window-names
|
||||
|
|
|
@ -119,8 +119,10 @@
|
|||
(let ((i (car msg))
|
||||
(cs (wm-clients wm)))
|
||||
(if (< i (length cs))
|
||||
(wm-select-client wm (list-ref cs i)
|
||||
(second msg)))))
|
||||
(begin
|
||||
(ignore-next-enter-notify!)
|
||||
(wm-select-client wm (list-ref cs i)
|
||||
(second msg))))))
|
||||
(loop)))))
|
||||
wm))
|
||||
|
||||
|
|
Loading…
Reference in New Issue