mirror of
https://github.com/emacs-exwm/exwm.git
synced 2024-11-30 16:07:59 +01:00
Remove an assertion
* exwm-randr.el (exwm-randr--refresh): There can be no valid output sometimes.
This commit is contained in:
parent
e9e476c4de
commit
3d643fafbe
1 changed files with 36 additions and 35 deletions
|
@ -84,42 +84,43 @@
|
||||||
output-plist (plist-put output-plist output-name geometry))
|
output-plist (plist-put output-plist output-name geometry))
|
||||||
(unless default-geometry ;assume the first output as primary
|
(unless default-geometry ;assume the first output as primary
|
||||||
(setq default-geometry geometry)))))))
|
(setq default-geometry geometry)))))))
|
||||||
(cl-assert (<= 2 (length output-plist)))
|
|
||||||
(exwm--log "(randr) outputs: %s" output-plist)
|
(exwm--log "(randr) outputs: %s" output-plist)
|
||||||
(setq workarea-offset (if exwm-workspace-minibuffer-position
|
(when output-plist
|
||||||
0
|
(setq workarea-offset (if exwm-workspace-minibuffer-position
|
||||||
(window-pixel-height (minibuffer-window))))
|
0
|
||||||
(dotimes (i exwm-workspace-number)
|
(window-pixel-height (minibuffer-window))))
|
||||||
(let* ((output (plist-get exwm-randr-workspace-output-plist i))
|
(dotimes (i exwm-workspace-number)
|
||||||
(geometry (lax-plist-get output-plist output))
|
(let* ((output (plist-get exwm-randr-workspace-output-plist i))
|
||||||
(frame (elt exwm-workspace--list i)))
|
(geometry (lax-plist-get output-plist output))
|
||||||
(unless geometry
|
(frame (elt exwm-workspace--list i)))
|
||||||
(setq geometry default-geometry
|
(unless geometry
|
||||||
output nil))
|
(setq geometry default-geometry
|
||||||
(set-frame-parameter frame 'exwm-randr-output output)
|
output nil))
|
||||||
(set-frame-parameter frame 'exwm-geometry geometry)
|
(set-frame-parameter frame 'exwm-randr-output output)
|
||||||
(with-slots (x y width height) geometry
|
(set-frame-parameter frame 'exwm-geometry geometry)
|
||||||
(exwm-layout--resize-container (frame-parameter frame 'exwm-outer-id)
|
(with-slots (x y width height) geometry
|
||||||
(frame-parameter frame
|
(exwm-layout--resize-container (frame-parameter frame
|
||||||
'exwm-workspace)
|
'exwm-outer-id)
|
||||||
x y width height)
|
(frame-parameter frame
|
||||||
(when (and (eq frame exwm-workspace--current)
|
'exwm-workspace)
|
||||||
(exwm-workspace--minibuffer-own-frame-p))
|
x y width height)
|
||||||
(exwm-workspace--resize-minibuffer-frame width height))
|
(when (and (eq frame exwm-workspace--current)
|
||||||
(setq workareas
|
(exwm-workspace--minibuffer-own-frame-p))
|
||||||
(nconc workareas (list x y width (- height
|
(exwm-workspace--resize-minibuffer-frame width height))
|
||||||
workarea-offset)))
|
(setq workareas
|
||||||
viewports (nconc viewports (list x y))))))
|
(nconc workareas (list x y width (- height
|
||||||
;; Update _NET_WORKAREA
|
workarea-offset)))
|
||||||
(xcb:+request exwm--connection
|
viewports (nconc viewports (list x y))))))
|
||||||
(make-instance 'xcb:ewmh:set-_NET_WORKAREA
|
;; Update _NET_WORKAREA
|
||||||
:window exwm--root :data (vconcat workareas)))
|
(xcb:+request exwm--connection
|
||||||
;; Update _NET_DESKTOP_VIEWPORT
|
(make-instance 'xcb:ewmh:set-_NET_WORKAREA
|
||||||
(xcb:+request exwm--connection
|
:window exwm--root :data (vconcat workareas)))
|
||||||
(make-instance 'xcb:ewmh:set-_NET_DESKTOP_VIEWPORT
|
;; Update _NET_DESKTOP_VIEWPORT
|
||||||
:window exwm--root
|
(xcb:+request exwm--connection
|
||||||
:data (vconcat viewports)))
|
(make-instance 'xcb:ewmh:set-_NET_DESKTOP_VIEWPORT
|
||||||
(xcb:flush exwm--connection)))
|
:window exwm--root
|
||||||
|
:data (vconcat viewports)))
|
||||||
|
(xcb:flush exwm--connection))))
|
||||||
|
|
||||||
(defvar exwm-randr-screen-change-hook nil
|
(defvar exwm-randr-screen-change-hook nil
|
||||||
"Normal hook run when screen changes.")
|
"Normal hook run when screen changes.")
|
||||||
|
|
Loading…
Reference in a new issue