all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Robert Pluim <rpluim@gmail.com>
To: emacs-devel@gnu.org
Cc: Lars Ingebrigtsen <larsi@gnus.org>
Subject: Re: master f421efdb5f: Make the size of elements the same in pgtk and X in tetris
Date: Mon, 22 Aug 2022 14:23:04 +0200	[thread overview]
Message-ID: <877d30zcuv.fsf@gmail.com> (raw)
In-Reply-To: <20220822115347.97D6CC04F01@vcs2.savannah.gnu.org> (Lars Ingebrigtsen's message of "Mon, 22 Aug 2022 07:53:47 -0400 (EDT)")

>>>>> 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
-- 



       reply	other threads:[~2022-08-22 12:23 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <166116922729.31296.246705257169485409@vcs2.savannah.gnu.org>
     [not found] ` <20220822115347.97D6CC04F01@vcs2.savannah.gnu.org>
2022-08-22 12:23   ` Robert Pluim [this message]
2022-08-22 12:31     ` master f421efdb5f: Make the size of elements the same in pgtk and X in tetris Lars Ingebrigtsen
2022-08-22 13:22       ` Robert Pluim

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=877d30zcuv.fsf@gmail.com \
    --to=rpluim@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=larsi@gnus.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.