mirror of
https://github.com/emacs-exwm/exwm.git
synced 2024-11-23 21:17: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,
|
;; + Simulation keys to mimic Emacs key bindings for text edit (redo, select,
|
||||||
;; cancel, clear, etc). Some of them are not present on common keyboard
|
;; cancel, clear, etc). Some of them are not present on common keyboard
|
||||||
;; (keycode = 0). May need to use XKB extension.
|
;; (keycode = 0). May need to use XKB extension.
|
||||||
;; + Investigate DnD support (e.g. drag a chromium tab to another window).
|
|
||||||
|
|
||||||
;;; Code:
|
;;; Code:
|
||||||
|
|
||||||
|
|
|
@ -239,7 +239,20 @@
|
||||||
(with-current-buffer (window-buffer window)
|
(with-current-buffer (window-buffer window)
|
||||||
(when (and (eq major-mode 'exwm-mode)
|
(when (and (eq major-mode 'exwm-mode)
|
||||||
(or exwm--floating-frame (not (eq frame exwm--frame))))
|
(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 ()
|
(defun exwm-layout--on-minibuffer-setup ()
|
||||||
"Refresh layout when minibuffer grows."
|
"Refresh layout when minibuffer grows."
|
||||||
|
|
|
@ -128,6 +128,10 @@ corresponding buffer.")
|
||||||
:cursor xcb:Cursor:None
|
:cursor xcb:Cursor:None
|
||||||
:button xcb:ButtonIndex:Any
|
:button xcb:ButtonIndex:Any
|
||||||
:modifiers xcb:ModMask: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)
|
(xcb:flush exwm--connection)
|
||||||
(exwm--update-title id)
|
(exwm--update-title id)
|
||||||
(exwm--update-transient-for id)
|
(exwm--update-transient-for id)
|
||||||
|
@ -150,6 +154,11 @@ corresponding buffer.")
|
||||||
(let ((buffer (exwm--id->buffer id)))
|
(let ((buffer (exwm--id->buffer id)))
|
||||||
(exwm--log "Unmanage #x%x (buffer: %s)" id buffer)
|
(exwm--log "Unmanage #x%x (buffer: %s)" id buffer)
|
||||||
(setq exwm--id-buffer-alist (assq-delete-all id exwm--id-buffer-alist))
|
(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)
|
(when (buffer-live-p buffer)
|
||||||
(with-current-buffer buffer
|
(with-current-buffer buffer
|
||||||
(exwm-workspace--update-switch-history)
|
(exwm-workspace--update-switch-history)
|
||||||
|
|
2
exwm.el
2
exwm.el
|
@ -417,6 +417,8 @@
|
||||||
(make-instance 'xcb:ewmh:set-_NET_SUPPORTED
|
(make-instance 'xcb:ewmh:set-_NET_SUPPORTED
|
||||||
:window exwm--root
|
:window exwm--root
|
||||||
:data (vector xcb:Atom:_NET_SUPPORTED
|
: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_NUMBER_OF_DESKTOPS
|
||||||
xcb:Atom:_NET_DESKTOP_VIEWPORT
|
xcb:Atom:_NET_DESKTOP_VIEWPORT
|
||||||
xcb:Atom:_NET_CURRENT_DESKTOP
|
xcb:Atom:_NET_CURRENT_DESKTOP
|
||||||
|
|
Loading…
Reference in a new issue