summaryrefslogtreecommitdiff
path: root/lisp/frame.el
diff options
context:
space:
mode:
authorJuri Linkov <juri@linkov.net>2019-03-19 23:43:18 +0200
committerJuri Linkov <juri@linkov.net>2019-03-19 23:43:18 +0200
commitded3c8de802d98635dc06faa178f91f99afdac53 (patch)
tree4c15c4f63ee3654e0d9c658b3f5df6812118bd52 /lisp/frame.el
parent2c541d84785d9dc1dcb6eacb7d9f8862668c1893 (diff)
downloademacs-ded3c8de802d98635dc06faa178f91f99afdac53.tar.gz
* lisp/frame.el (frame-monitor-attributes): Fall back to the last monitor
when frames monitor attributes is still uninitialized. (Bug#34680)
Diffstat (limited to 'lisp/frame.el')
-rw-r--r--lisp/frame.el5
1 files changed, 4 insertions, 1 deletions
diff --git a/lisp/frame.el b/lisp/frame.el
index c5802e30b6e..7cfe546ca6a 100644
--- a/lisp/frame.el
+++ b/lisp/frame.el
@@ -1696,7 +1696,10 @@ keys and their meanings."
(or frame (setq frame (selected-frame)))
(cl-loop for attributes in (display-monitor-attributes-list frame)
for frames = (cdr (assq 'frames attributes))
- if (memq frame frames) return attributes))
+ if (memq frame frames) return attributes
+ ;; On broken frames monitor attributes,
+ ;; fall back to the last monitor.
+ finally return attributes))
(defun frame-monitor-attribute (attribute &optional frame x y)
"Return the value of ATTRIBUTE on FRAME's monitor.