aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuri Linkov2019-03-19 23:43:18 +0200
committerJuri Linkov2019-03-19 23:43:18 +0200
commitded3c8de802d98635dc06faa178f91f99afdac53 (patch)
tree4c15c4f63ee3654e0d9c658b3f5df6812118bd52
parent2c541d84785d9dc1dcb6eacb7d9f8862668c1893 (diff)
downloademacs-ded3c8de802d98635dc06faa178f91f99afdac53.tar.gz
emacs-ded3c8de802d98635dc06faa178f91f99afdac53.zip
* lisp/frame.el (frame-monitor-attributes): Fall back to the last monitor
when frames monitor attributes is still uninitialized. (Bug#34680)
-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."
1696 (or frame (setq frame (selected-frame))) 1696 (or frame (setq frame (selected-frame)))
1697 (cl-loop for attributes in (display-monitor-attributes-list frame) 1697 (cl-loop for attributes in (display-monitor-attributes-list frame)
1698 for frames = (cdr (assq 'frames attributes)) 1698 for frames = (cdr (assq 'frames attributes))
1699 if (memq frame frames) return attributes)) 1699 if (memq frame frames) return attributes
1700 ;; On broken frames monitor attributes,
1701 ;; fall back to the last monitor.
1702 finally return attributes))
1700 1703
1701(defun frame-monitor-attribute (attribute &optional frame x y) 1704(defun frame-monitor-attribute (attribute &optional frame x y)
1702 "Return the value of ATTRIBUTE on FRAME's monitor. 1705 "Return the value of ATTRIBUTE on FRAME's monitor.