mirror of
https://github.com/emacs-exwm/exwm.git
synced 2024-11-23 13:07:59 +01:00
Add support for xcb:Atom:_NET_CLIENT_LIST_STACKING etc
The _NET_CLIENT_LIST_STACKING EWMH property is essential for e.g. the tabbar of chromium to work correctly. * exwm-input.el: Remove invalid TODO item. * exwm.el (exwm--init-icccm-ewmh): Add xcb:Atom:_NET_CLIENT_LIST and xcb:Atom:_NET_CLIENT_LIST_STACKING to _NET_SUPPORTED. * exwm-layout.el (exwm-layout--refresh): Update _NET_CLIENT_LIST_STACKING. * exwm-manage.el (exwm-manage--manage-window, exwm-manage--unmanage-window): Update _NET_CLIENT_LIST.
This commit is contained in:
parent
eafd031c55
commit
5373c1df1a
4 changed files with 25 additions and 2 deletions
|
@ -32,7 +32,6 @@
|
|||
;; + Simulation keys to mimic Emacs key bindings for text edit (redo, select,
|
||||
;; cancel, clear, etc). Some of them are not present on common keyboard
|
||||
;; (keycode = 0). May need to use XKB extension.
|
||||
;; + Investigate DnD support (e.g. drag a chromium tab to another window).
|
||||
|
||||
;;; Code:
|
||||
|
||||
|
|
|
@ -239,7 +239,20 @@
|
|||
(with-current-buffer (window-buffer window)
|
||||
(when (and (eq major-mode 'exwm-mode)
|
||||
(or exwm--floating-frame (not (eq frame exwm--frame))))
|
||||
(set-window-buffer window placeholder)))))))
|
||||
(set-window-buffer window placeholder))))
|
||||
;; Update _NET_CLIENT_LIST_STACKING
|
||||
(xcb:+request exwm--connection
|
||||
(make-instance 'xcb:ewmh:set-_NET_CLIENT_LIST_STACKING
|
||||
:window exwm--root
|
||||
:data (vconcat
|
||||
(delq nil
|
||||
(mapcar
|
||||
(lambda (buffer)
|
||||
(with-current-buffer buffer
|
||||
(when (eq major-mode 'exwm-mode)
|
||||
exwm--id)))
|
||||
(buffer-list))))))
|
||||
(xcb:flush exwm--connection))))
|
||||
|
||||
(defun exwm-layout--on-minibuffer-setup ()
|
||||
"Refresh layout when minibuffer grows."
|
||||
|
|
|
@ -128,6 +128,10 @@ corresponding buffer.")
|
|||
:cursor xcb:Cursor:None
|
||||
:button xcb:ButtonIndex:Any
|
||||
:modifiers xcb:ModMask:Any))
|
||||
(xcb:+request exwm--connection ;update _NET_CLIENT_LIST
|
||||
(make-instance 'xcb:ewmh:set-_NET_CLIENT_LIST
|
||||
:window exwm--root
|
||||
:data (vconcat (mapcar #'car exwm--id-buffer-alist))))
|
||||
(xcb:flush exwm--connection)
|
||||
(exwm--update-title id)
|
||||
(exwm--update-transient-for id)
|
||||
|
@ -150,6 +154,11 @@ corresponding buffer.")
|
|||
(let ((buffer (exwm--id->buffer id)))
|
||||
(exwm--log "Unmanage #x%x (buffer: %s)" id buffer)
|
||||
(setq exwm--id-buffer-alist (assq-delete-all id exwm--id-buffer-alist))
|
||||
(xcb:+request exwm--connection ;update _NET_CLIENT_LIST
|
||||
(make-instance 'xcb:ewmh:set-_NET_CLIENT_LIST
|
||||
:window exwm--root
|
||||
:data (vconcat (mapcar #'car exwm--id-buffer-alist))))
|
||||
(xcb:flush exwm--connection)
|
||||
(when (buffer-live-p buffer)
|
||||
(with-current-buffer buffer
|
||||
(exwm-workspace--update-switch-history)
|
||||
|
|
2
exwm.el
2
exwm.el
|
@ -417,6 +417,8 @@
|
|||
(make-instance 'xcb:ewmh:set-_NET_SUPPORTED
|
||||
:window exwm--root
|
||||
:data (vector xcb:Atom:_NET_SUPPORTED
|
||||
xcb:Atom:_NET_CLIENT_LIST
|
||||
xcb:Atom:_NET_CLIENT_LIST_STACKING
|
||||
xcb:Atom:_NET_NUMBER_OF_DESKTOPS
|
||||
xcb:Atom:_NET_DESKTOP_VIEWPORT
|
||||
xcb:Atom:_NET_CURRENT_DESKTOP
|
||||
|
|
Loading…
Reference in a new issue