Fix issue with managed tray icons
* exwm-input.el (exwm-input--on-ButtonPress): Replay button events destined for managed tray icons.
This commit is contained in:
parent
404c94568d
commit
4f854e9fff
1 changed files with 10 additions and 3 deletions
|
@ -382,6 +382,7 @@ ARGS are additional arguments to CALLBACK."
|
||||||
buffer (exwm--id->buffer event)
|
buffer (exwm--id->buffer event)
|
||||||
window (get-buffer-window buffer t))
|
window (get-buffer-window buffer t))
|
||||||
(cond ((and (eq button-event exwm-input-move-event)
|
(cond ((and (eq button-event exwm-input-move-event)
|
||||||
|
buffer
|
||||||
;; Either an undecorated or a floating X window.
|
;; Either an undecorated or a floating X window.
|
||||||
(with-current-buffer buffer
|
(with-current-buffer buffer
|
||||||
(or (not (derived-mode-p 'exwm-mode))
|
(or (not (derived-mode-p 'exwm-mode))
|
||||||
|
@ -390,12 +391,13 @@ ARGS are additional arguments to CALLBACK."
|
||||||
(exwm-floating--start-moveresize
|
(exwm-floating--start-moveresize
|
||||||
event xcb:ewmh:_NET_WM_MOVERESIZE_MOVE))
|
event xcb:ewmh:_NET_WM_MOVERESIZE_MOVE))
|
||||||
((and (eq button-event exwm-input-resize-event)
|
((and (eq button-event exwm-input-resize-event)
|
||||||
|
buffer
|
||||||
(with-current-buffer buffer
|
(with-current-buffer buffer
|
||||||
(or (not (derived-mode-p 'exwm-mode))
|
(or (not (derived-mode-p 'exwm-mode))
|
||||||
exwm--floating-frame)))
|
exwm--floating-frame)))
|
||||||
;; Resize
|
;; Resize
|
||||||
(exwm-floating--start-moveresize event))
|
(exwm-floating--start-moveresize event))
|
||||||
(t
|
(buffer
|
||||||
;; Click to focus
|
;; Click to focus
|
||||||
(unless (eq window (selected-window))
|
(unless (eq window (selected-window))
|
||||||
(setq frame (window-frame window))
|
(setq frame (window-frame window))
|
||||||
|
@ -414,13 +416,18 @@ ARGS are additional arguments to CALLBACK."
|
||||||
(select-window window)
|
(select-window window)
|
||||||
(setq window (get-buffer-window buffer t))
|
(setq window (get-buffer-window buffer t))
|
||||||
(when window (select-window window))))
|
(when window (select-window window))))
|
||||||
|
;; Also process keybindings.
|
||||||
(with-current-buffer buffer
|
(with-current-buffer buffer
|
||||||
(when (derived-mode-p 'exwm-mode)
|
(when (derived-mode-p 'exwm-mode)
|
||||||
(cl-case exwm--input-mode
|
(cl-case exwm--input-mode
|
||||||
(line-mode
|
(line-mode
|
||||||
(setq mode (exwm-input--on-ButtonPress-line-mode buffer button-event)))
|
(setq mode (exwm-input--on-ButtonPress-line-mode
|
||||||
|
buffer button-event)))
|
||||||
(char-mode
|
(char-mode
|
||||||
(setq mode (exwm-input--on-ButtonPress-char-mode)))))))))
|
(setq mode (exwm-input--on-ButtonPress-char-mode)))))))
|
||||||
|
(t
|
||||||
|
;; Replay this event by default.
|
||||||
|
(setq mode xcb:Allow:ReplayPointer))))
|
||||||
(xcb:+request exwm--connection
|
(xcb:+request exwm--connection
|
||||||
(make-instance 'xcb:AllowEvents :mode mode :time xcb:Time:CurrentTime))
|
(make-instance 'xcb:AllowEvents :mode mode :time xcb:Time:CurrentTime))
|
||||||
(xcb:flush exwm--connection)))
|
(xcb:flush exwm--connection)))
|
||||||
|
|
Loading…
Reference in a new issue