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
|
|
@ -155,8 +155,7 @@
|
|||
(defvar exwm-workspace--current)
|
||||
(defvar exwm-workspace--list)
|
||||
|
||||
(declare-function exwm-workspace--set-fullscreen "exwm-workspace.el"
|
||||
(frame &optional no-struts container-only))
|
||||
(declare-function exwm-workspace--set-fullscreen "exwm-workspace.el" (frame))
|
||||
|
||||
;;;###autoload
|
||||
(defun exwm-layout-set-fullscreen (&optional id)
|
||||
|
|
@ -165,15 +164,20 @@
|
|||
(with-current-buffer (if id (exwm--id->buffer id) (window-buffer))
|
||||
(when exwm--fullscreen
|
||||
(user-error "Already in full-screen mode."))
|
||||
;; Set the floating frame fullscreen first when the client is floating
|
||||
;; Save the position of floating frame.
|
||||
(when exwm--floating-frame
|
||||
(let* ((geometry (xcb:+request-unchecked+reply exwm--connection
|
||||
(make-instance 'xcb:GetGeometry
|
||||
:drawable exwm--container))))
|
||||
(setq exwm--floating-frame-position
|
||||
(vector (slot-value geometry 'x) (slot-value geometry 'y)))))
|
||||
;; Expand the workspace frame & its container to fill the whole screen.
|
||||
(exwm-workspace--set-fullscreen exwm--frame t t)
|
||||
;; Expand the workspace to fill the whole screen.
|
||||
(with-slots (x y width height) (exwm-workspace--get-geometry exwm--frame)
|
||||
(exwm-layout--resize-container nil
|
||||
(frame-parameter exwm--frame
|
||||
'exwm-workspace)
|
||||
x y width height
|
||||
t))
|
||||
;; Raise the workspace container (in case there are docks).
|
||||
(xcb:+request exwm--connection
|
||||
(make-instance 'xcb:ConfigureWindow
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue