emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 865338150e: Use frame-monitor-attributes in gamegrid


From: Robert Pluim
Subject: master 865338150e: Use frame-monitor-attributes in gamegrid
Date: Fri, 2 Sep 2022 05:36:31 -0400 (EDT)

branch: master
commit 865338150eabb5d221cffc79f549a87c26c4ec68
Author: Robert Pluim <rpluim@gmail.com>
Commit: Robert Pluim <rpluim@gmail.com>

    Use frame-monitor-attributes in gamegrid
    
    * lisp/play/gamegrid.el (gamegrid-calculate-glyph-size): Use
    `frame-monitor-attributes' to get the frame attributes directly
    instead of iterating over `display-monitor-attributes-list'.
---
 lisp/play/gamegrid.el | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/lisp/play/gamegrid.el b/lisp/play/gamegrid.el
index 8cff67c5bc..4e4982e7b0 100644
--- a/lisp/play/gamegrid.el
+++ b/lisp/play/gamegrid.el
@@ -80,12 +80,8 @@ directory will be used.")
 (defun gamegrid-calculate-glyph-size ()
   "Calculate appropriate glyph size in pixels based on display resolution.
 Return a multiple of 8 no less than 16."
-  (let (atts
+  (let ((atts (frame-monitor-attributes))
         y-pitch)
-    (dolist (mon (display-monitor-attributes-list))
-      (when-let ((frames (alist-get 'frames mon))
-                 (match (memq (selected-frame) frames)))
-        (setq atts mon)))
     (setq y-pitch (cond
                    (atts
                     (/ (nth 4 (assq 'geometry atts))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]