]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/frame.el (frame-monitor-attributes): Fall back to the last monitor
authorJuri Linkov <juri@linkov.net>
Tue, 19 Mar 2019 21:43:18 +0000 (23:43 +0200)
committerJuri Linkov <juri@linkov.net>
Tue, 19 Mar 2019 21:43:18 +0000 (23:43 +0200)
when frames monitor attributes is still uninitialized.  (Bug#34680)

lisp/frame.el

index c5802e30b6eab3f7707277465dee9c479277fb60..7cfe546ca6a128a2bd3fda7c17d52c5b0cf1c29f 100644 (file)
@@ -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.