Add RandR support for docks and reuse workareas
* exwm-workspace (exwm-workspace--update-struts): Add RandR support for docks. * exwm-workspace (exwm-workspace--workareas): New variable for storing workareas. (exwm-workspace--update-workareas): Update workareas and set _NET_WORKAREA (replaces `exwm-workspace--set-workareas'). (exwm-workspace--set-fullscreen): Reuse workareas for resizing and drop optional arguments. (exwm-workspace--resize-minibuffer-frame) (exwm-workspace--on-ConfigureNotify): Reuse workareas for resizing/reposition the (optional) dedicated minibuffer frame. * exwm-layout.el (exwm-layout-set-fullscreen): Do not use `exwm-workspace--set-fullscreen' here. * exwm-manage.el (exwm-manage--unmanage-window): * exwm-randr.el (exwm-randr--refresh): * exwm.el (exwm--update-struts-legacy, exwm--update-struts-partial): Update workareas before resizing workspaces. * exwm.el (exwm--update-struts-legacy, exwm--update-struts-partial): Remove the corresponding record on receiving invalid struts. * exwm-workspace.el (exwm-workspace--get-geometry): New utility function for retrieving workspace geometry.
This commit is contained in:
parent
7f12d9fc7a
commit
4ac71a7ddc
5 changed files with 170 additions and 148 deletions
32
exwm.el
32
exwm.el
|
|
@ -237,15 +237,19 @@
|
|||
:window id)))
|
||||
(when reply
|
||||
(setq struts (slot-value reply 'value))
|
||||
(if pair
|
||||
(setcdr pair struts)
|
||||
(push (cons id struts) exwm-workspace--id-struts-alist))
|
||||
(if struts
|
||||
(if pair
|
||||
(setcdr pair struts)
|
||||
(push (cons id struts) exwm-workspace--id-struts-alist))
|
||||
(when pair
|
||||
(setq exwm-workspace--id-struts-alist
|
||||
(assq-delete-all id exwm-workspace--id-struts-alist))))
|
||||
(exwm-workspace--update-struts))
|
||||
;; Update workareas and set _NET_WORKAREA.
|
||||
(exwm-workspace--update-workareas)
|
||||
;; Update workspaces.
|
||||
(dolist (f exwm-workspace--list)
|
||||
(exwm-workspace--set-fullscreen f))
|
||||
;; Update _NET_WORKAREA.
|
||||
(exwm-workspace--set-workareas))))
|
||||
(exwm-workspace--set-fullscreen f)))))
|
||||
|
||||
(defun exwm--update-struts-partial (id)
|
||||
"Update _NET_WM_STRUT_PARTIAL."
|
||||
|
|
@ -256,15 +260,19 @@
|
|||
(when reply
|
||||
(setq struts (slot-value reply 'value)
|
||||
pair (assq id exwm-workspace--id-struts-alist))
|
||||
(if pair
|
||||
(setcdr pair struts)
|
||||
(push (cons id struts) exwm-workspace--id-struts-alist))
|
||||
(if struts
|
||||
(if pair
|
||||
(setcdr pair struts)
|
||||
(push (cons id struts) exwm-workspace--id-struts-alist))
|
||||
(when pair
|
||||
(setq exwm-workspace--id-struts-alist
|
||||
(assq-delete-all id exwm-workspace--id-struts-alist))))
|
||||
(exwm-workspace--update-struts))
|
||||
;; Update workareas and set _NET_WORKAREA.
|
||||
(exwm-workspace--update-workareas)
|
||||
;; Update workspaces.
|
||||
(dolist (f exwm-workspace--list)
|
||||
(exwm-workspace--set-fullscreen f))
|
||||
;; Update _NET_WORKAREA.
|
||||
(exwm-workspace--set-workareas)))
|
||||
(exwm-workspace--set-fullscreen f))))
|
||||
|
||||
(defun exwm--update-struts (id)
|
||||
"Update _NET_WM_STRUT_PARTIAL or _NET_WM_STRUT."
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue