From: Juri Linkov Date: Tue, 19 Mar 2019 21:43:18 +0000 (+0200) Subject: * lisp/frame.el (frame-monitor-attributes): Fall back to the last monitor X-Git-Tag: emacs-27.0.90~3389 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=ded3c8de802d98635dc06faa178f91f99afdac53;p=emacs.git * lisp/frame.el (frame-monitor-attributes): Fall back to the last monitor when frames monitor attributes is still uninitialized. (Bug#34680) --- 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.