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.
This commit is contained in:
parent
ac90530a0a
commit
0dd51d8ebf
1 changed files with 5 additions and 1 deletions
|
@ -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))
|
||||
|
|
Loading…
Add table
Reference in a new issue