From ded3c8de802d98635dc06faa178f91f99afdac53 Mon Sep 17 00:00:00 2001 From: Juri Linkov Date: Tue, 19 Mar 2019 23:43:18 +0200 Subject: [PATCH] * lisp/frame.el (frame-monitor-attributes): Fall back to the last monitor when frames monitor attributes is still uninitialized. (Bug#34680) --- lisp/frame.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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. -- 2.39.5