* Re: master f421efdb5f: Make the size of elements the same in pgtk and X in tetris
[not found] ` <20220822115347.97D6CC04F01@vcs2.savannah.gnu.org>
@ 2022-08-22 12:23 ` Robert Pluim
2022-08-22 12:31 ` Lars Ingebrigtsen
0 siblings, 1 reply; 3+ messages in thread
From: Robert Pluim @ 2022-08-22 12:23 UTC (permalink / raw)
To: emacs-devel; +Cc: Lars Ingebrigtsen
>>>>> On Mon, 22 Aug 2022 07:53:47 -0400 (EDT), Lars Ingebrigtsen <larsi@gnus.org> said:
Lars> branch: master
Lars> commit f421efdb5f03d5f7efc3f6893c280b27e54a33cb
Lars> Author: Lars Ingebrigtsen <larsi@gnus.org>
Lars> Commit: Lars Ingebrigtsen <larsi@gnus.org>
Lars> Make the size of elements the same in pgtk and X in tetris
Lars> * lisp/play/gamegrid.el (gamegrid-glyph-height-mm): Decrease
Lars> height a bit (since it wasn't really that height).
Lars> (gamegrid-calculate-glyph-size): Change calculation to work on
Lars> both X and pgtk (bug#49937).
Lars> (gamegrid-make-glyph): Inhibit image scaling.
That will always use the primary monitor. How about something like
this on top
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 @@ gamegrid-glyph-height-mm
(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))
Robert
--
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-08-22 13:22 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <166116922729.31296.246705257169485409@vcs2.savannah.gnu.org>
[not found] ` <20220822115347.97D6CC04F01@vcs2.savannah.gnu.org>
2022-08-22 12:23 ` master f421efdb5f: Make the size of elements the same in pgtk and X in tetris Robert Pluim
2022-08-22 12:31 ` Lars Ingebrigtsen
2022-08-22 13:22 ` Robert Pluim
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).