[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 0dd51d8ebf: Use the attributes of frame's monitor for gamegrid
From: |
Robert Pluim |
Subject: |
master 0dd51d8ebf: Use the attributes of frame's monitor for gamegrid |
Date: |
Mon, 22 Aug 2022 09:22:23 -0400 (EDT) |
branch: master
commit 0dd51d8ebf15c66834ba3573794d3d7e1dd34953
Author: Robert Pluim <rpluim@gmail.com>
Commit: Robert Pluim <rpluim@gmail.com>
Use the attributes of frame's monitor for gamegrid
* lisp/play/gamegrid.el (gamegrid-calculate-glyph-size): Use the
monitor where the current frame is displayed rather than the primary
monitor.
---
lisp/play/gamegrid.el | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/lisp/play/gamegrid.el b/lisp/play/gamegrid.el
index 3ad42114d0..bdc056e1dd 100644
--- a/lisp/play/gamegrid.el
+++ b/lisp/play/gamegrid.el
@@ -80,8 +80,12 @@ 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 (car (display-monitor-attributes-list)))
+ (let (atts
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))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 0dd51d8ebf: Use the attributes of frame's monitor for gamegrid,
Robert Pluim <=