diff options
author | Robert Pluim <rpluim@gmail.com> | 2022-08-22 14:33:02 +0200 |
---|---|---|
committer | Robert Pluim <rpluim@gmail.com> | 2022-08-22 15:22:07 +0200 |
commit | 0dd51d8ebf15c66834ba3573794d3d7e1dd34953 (patch) | |
tree | 723df6babc354aa5c79840a989e5e39ba60eec60 /lisp/play | |
parent | ac90530a0af5c96d27e5e38e2937209a003ff1a2 (diff) | |
download | emacs-0dd51d8ebf15c66834ba3573794d3d7e1dd34953.tar.gz emacs-0dd51d8ebf15c66834ba3573794d3d7e1dd34953.tar.bz2 emacs-0dd51d8ebf15c66834ba3573794d3d7e1dd34953.zip |
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.
Diffstat (limited to 'lisp/play')
-rw-r--r-- | lisp/play/gamegrid.el | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lisp/play/gamegrid.el b/lisp/play/gamegrid.el index 3ad42114d01..bdc056e1ddf 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)) |