From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: tomasralph2000@gmail.com Newsgroups: gmane.emacs.bugs Subject: bug#62392: frame-monitor-attributes fails to calculate mm-size for the monitor Date: Wed, 22 Mar 2023 19:35:21 +0000 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="--=_RainLoop_248_271416756.1679513721" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="28351"; mail-complaints-to="usenet@ciao.gmane.io" To: 62392@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Mar 22 21:43:32 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pf5Iy-0007BX-3e for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 22 Mar 2023 21:43:32 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pf5IX-0004i4-8N; Wed, 22 Mar 2023 16:43:05 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pf5IU-0004hh-TP for bug-gnu-emacs@gnu.org; Wed, 22 Mar 2023 16:43:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pf5IU-0001bx-Fp for bug-gnu-emacs@gnu.org; Wed, 22 Mar 2023 16:43:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pf5IU-0003JQ-0E for bug-gnu-emacs@gnu.org; Wed, 22 Mar 2023 16:43:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: tomasralph2000@gmail.com Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 22 Mar 2023 20:43:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 62392 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.167951777912717 (code B ref -1); Wed, 22 Mar 2023 20:43:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 22 Mar 2023 20:42:59 +0000 Original-Received: from localhost ([127.0.0.1]:36800 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pf5IP-0003J2-Kv for submit@debbugs.gnu.org; Wed, 22 Mar 2023 16:42:58 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:50772) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pf4Du-0001bW-Pr for submit@debbugs.gnu.org; Wed, 22 Mar 2023 15:34:15 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pf4Du-0000wH-6Z for bug-gnu-emacs@gnu.org; Wed, 22 Mar 2023 15:34:14 -0400 Original-Received: from mail-oa1-x2e.google.com ([2001:4860:4864:20::2e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pf4Dr-0002R1-51 for bug-gnu-emacs@gnu.org; Wed, 22 Mar 2023 15:34:13 -0400 Original-Received: by mail-oa1-x2e.google.com with SMTP id 586e51a60fabf-1755e639b65so20537053fac.3 for ; Wed, 22 Mar 2023 12:34:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1679513649; h=to:subject:message-id:from:date:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=4GID6M1HNBr69o6K3+sClUUR/E1Q+zXK5sD/mGPkvI0=; b=NnRcnmd5cnxVsUGXnsQEV9ocx7BQA+sHkl/IoirYvpV7PD9wTwOJoYdQtCA+ELMtLe PX4PDNVqdzOqWU5YRgsp+iHKhCa+HQ5E1qJV+oWujCTXOz6+zy11jDGgCj5IXSOKLOqy jQYx/22SEKwPAoyp5oY4ErsI4eiqNW0hauXVqKYAPDryzVSBzJW7KP4o4sty5gG0Bz3F VRwgo2/eujuxx1DSdCZxgCe82oj5l0vkv8U0iIgG9WlCB/4YS3NQrLIWUhdTslg9KVZl eLXxA20UrAOhGFoWSPPtsqstom7iVA6+9zBgydap8ciC41L3QCcTGD6g3f+08yJZ5FKs 9FBg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679513649; h=to:subject:message-id:from:date:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=4GID6M1HNBr69o6K3+sClUUR/E1Q+zXK5sD/mGPkvI0=; b=7Tvf3cTQUmRdtOXRhGC2YUsF7a7WAnTdQom7n3AChS7qKR4ciWljyv1FTAl2dF0Rzk jlxoINo5VHCjHR1Sl2Y8VLqBFRtZv8r6IYyUcCWWzsp7HMR3zwGYSY3ew4TCWV4JjYAZ 9z8hLOG8LRftj4yaVTnuR0OG23khhJ7Hmbp7hxGu1Y3FEoH8LQIumA4OW5c/yUa3oMGX LeDSBfREJN1wZF3F95lhskMYpLxaM/lfHtH3x8Aj3ABg6uikcn+L0/vsJWphzJVN4M9y MhPcjOTZuY9IpiHcwNzd8oNr4dHXGIWN+mRhb73bj8YfSX42GupBDUTWYZGqBPXOZeon JM9g== X-Gm-Message-State: AAQBX9eJnleIfv4VDYEHp8YernxcT1przOGQXE1MlapvZJLCOnZ8BcS1 ojcGlb1JZk5YnzgQWavhErsnEEAD8fk= X-Google-Smtp-Source: AKy350Z6ZJMoRUbTSWhbMpWBGVetkPknICt4HrJ9AkOIfRUDQhNS/pOPdaeUS99FjeeO/FyoTz/hzA== X-Received: by 2002:a05:6870:1d1:b0:16e:8ce5:b94 with SMTP id n17-20020a05687001d100b0016e8ce50b94mr639484oad.43.1679513649071; Wed, 22 Mar 2023 12:34:09 -0700 (PDT) Original-Received: from rainloop.titocloud.duckdns.org ([186.189.239.39]) by smtp.gmail.com with ESMTPSA id ya9-20020a0568714cc900b001723a2e84b6sm5520302oab.6.2023.03.22.12.34.08 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 22 Mar 2023 12:34:08 -0700 (PDT) X-Mailer: RainLoop/1.13.0 Received-SPF: pass client-ip=2001:4860:4864:20::2e; envelope-from=tomasralph2000@gmail.com; helo=mail-oa1-x2e.google.com X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Wed, 22 Mar 2023 16:42:56 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:258414 Archived-At: ----=_RainLoop_248_271416756.1679513721 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Whenever I try to run tetris, or snake, or pong, I get "arithmetic overfl= ow error". After digging a bit, I found where the issue lies. This functi= on:=0A=0A (defun gamegrid-calculate-glyph-size ()=0A "Calculate appropria= te glyph size in pixels based on display resolution.=0A Return a multiple= of 8 no less than 16."=0A (let ((atts (frame-monitor-attributes))=0A y-p= itch)=0A (setq y-pitch (cond=0A (atts=0A (/ (nth 4 (assq 'geometry atts))= =0A (nth 2 (assq 'mm-size atts))=0A (or (cdr (assq 'scale-factor atts)) 1= .0)))=0A ((and (display-pixel-height) (display-mm-height))=0A (/ (display= -pixel-height) (float (display-mm-height))))))=0A (if y-pitch=0A (let* ((= pixels (* y-pitch gamegrid-glyph-height-mm))=0A (rounded (* (floor (/ (+ = pixels 4) 8)) 8)))=0A (max 16 rounded))=0A 16)))=0A=0AIs the one causing = the error. Where in particular? This section:=0A=0A (/ (nth 4 (assq 'geom= etry atts))=0A (nth 2 (assq 'mm-size atts))=0A=0AWhat's the issue here? `= (assq 'mm-size atts)` returns 0. For some reason, emacs can't seem to get= my monitor size in milimeters. I have tried this on two different laptop= s, they both return proper values. This is happening on my desktop, where= it fails.=0A=0AI am using Wayland (with Hyprland) and the PGTK version o= f emacs, which likely has something to do with this. This is what `frame-= monitor-attributes` returns for me:=0A=0A ((name . "HDMI") (geometry 0 0 = 1920 1080) (workarea 0 0 1920 1080) (mm-size 0 0) (scale-factor . 1.0) (f= rames # #) (source . "Gdk"))=0A=0AAs you can see, the `mm-size` is 0,= so emacs divides by zero. Amazingly, this is not what causes the error, = the variable simply gets set to infinity. The error comes later, when it = tries to multiply by infinity. Oh lord.=0A=0AThis is what emacs outputs o= n my laptop for the same `frame-monitor-attributes`. Note that my laptop = runs the exact same setup, it also runs Hyprland, it also runs emacs with= PGTK, it uses the same config for everything since I have the same dotif= les repo cloned in both systems:=0A=0A ((name . "0x0335") (geometry 0 0 1= 366 768) (workarea 0 0 1366 768) (mm-size 310 170) (scale-factor . 1.0) (= frames # #) (source . "Gdk"))=0A=0AThis time, the `mm-size` gets properl= y calculated.=0A=0ASo something is funky with `frame-monitor-attributes`.= Any direction on=0Ahow I can further debug this would be appreciated.=0A= In GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version=0A 3.24.= 37, cairo version 1.17.8) of 2023-03-21 built on Rainbow=0ARepository rev= ision: 42fba8f36b19536964d6deb6a34f3fd1c02b43dd=0ARepository branch: make= pkg=0ASystem Description: Arch Linux=0A=0AConfigured using:=0A 'configure= --prefix=3D/usr --sysconfdir=3D/etc --libexecdir=3D/usr/lib=0A --localst= atedir=3D/var --mandir=3D/usr/share/man --with-gameuser=3D:games=0A --wit= h-modules --without-libotf --without-m17n-flt --without-gconf=0A --with-n= ative-compilation=3Dyes --with-native-compilation=3Daot=0A --with-xinput2= --with-pgtk --without-xaw3d --with-sound=3Dalsa=0A --with-tree-sitter --= without-gpm --without-compress-install=0A '--program-transform-name=3Ds/(= [ec]tags)/1.emacs/'=0A 'CFLAGS=3D-march=3Dx86-64 -mtune=3Dgeneric -O2 -pi= pe -fno-plt -fexceptions=0A -Wp,-D_FORTIFY_SOURCE=3D2 -Wformat -Werror=3D= format-security=0A -fstack-clash-protection -fcf-protection'=0A LDFLAGS= =3D-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now'=0A=0AConfigured fea= tures:=0AACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GSETTINGS HARFBUZZ J= PEG JSON=0ALCMS2 LIBSYSTEMD LIBXML2 MODULES NATIVE_COMP NOTIFY INOTIFY PD= UMPER PGTK=0APNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF TOOLKIT_SCROLL_B= ARS=0ATREE_SITTER WEBP XIM GTK3 ZLIB=0A=0AImportant settings:=0A value of= $LANG: en_US.UTF-8=0A locale-coding-system: utf-8-unix=0A=0AMajor mode: = Lisp Interaction=0A=0AMinor modes in effect:=0A which-key-mode: t=0A rece= ntf-mode: t=0A global-git-commit-mode: t=0A magit-auto-revert-mode: t=0A = shell-dirtrack-mode: t=0A override-global-mode: t=0A vertico-mouse-mode: = t=0A vertico-mode: t=0A corfu-popupinfo-mode: t=0A global-corfu-mode: t= =0A corfu-mode: t=0A pixel-scroll-precision-mode: t=0A global-display-lin= e-numbers-mode: t=0A display-line-numbers-mode: t=0A tooltip-mode: t=0A g= lobal-eldoc-mode: t=0A eldoc-mode: t=0A show-paren-mode: t=0A electric-in= dent-mode: t=0A mouse-wheel-mode: t=0A file-name-shadow-mode: t=0A global= -font-lock-mode: t=0A font-lock-mode: t=0A blink-cursor-mode: t=0A line-n= umber-mode: t=0A transient-mark-mode: t=0A auto-composition-mode: t=0A au= to-encryption-mode: t=0A auto-compression-mode: t=0A=0ALoad-path shadows:= =0A/home/tralph3/.local/share/emacs/elpa/jsonrpc-1.0.16/jsonrpc hides /us= r/share/emacs/30.0.50/lisp/jsonrpc=0A/home/tralph3/.local/share/emacs/elp= a/transient-20230304.1149/transient hides /usr/share/emacs/30.0.50/lisp/t= ransient=0A/home/tralph3/.local/share/emacs/elpa/use-package-20230203.200= 4/use-package hides /usr/share/emacs/30.0.50/lisp/use-package/use-package= =0A/home/tralph3/.local/share/emacs/elpa/use-package-20230203.2004/use-pa= ckage-core hides /usr/share/emacs/30.0.50/lisp/use-package/use-package-co= re=0A/home/tralph3/.local/share/emacs/elpa/use-package-20230203.2004/use-= package-jump hides /usr/share/emacs/30.0.50/lisp/use-package/use-package-= jump=0A/home/tralph3/.local/share/emacs/elpa/use-package-20230203.2004/us= e-package-bind-key hides /usr/share/emacs/30.0.50/lisp/use-package/use-pa= ckage-bind-key=0A/home/tralph3/.local/share/emacs/elpa/use-package-202302= 03.2004/use-package-delight hides /usr/share/emacs/30.0.50/lisp/use-packa= ge/use-package-delight=0A/home/tralph3/.local/share/emacs/elpa/use-packag= e-20230203.2004/use-package-diminish hides /usr/share/emacs/30.0.50/lisp/= use-package/use-package-diminish=0A/home/tralph3/.local/share/emacs/elpa/= bind-key-20230203.2004/bind-key hides /usr/share/emacs/30.0.50/lisp/use-p= ackage/bind-key=0A/home/tralph3/.local/share/emacs/elpa/use-package-20230= 203.2004/use-package-lint hides /usr/share/emacs/30.0.50/lisp/use-package= /use-package-lint=0A/home/tralph3/.local/share/emacs/elpa/use-package-202= 30203.2004/use-package-ensure hides /usr/share/emacs/30.0.50/lisp/use-pac= kage/use-package-ensure=0A/home/tralph3/.local/share/emacs/elpa/project-0= .9.8/project hides /usr/share/emacs/30.0.50/lisp/progmodes/project=0A/hom= e/tralph3/.local/share/emacs/elpa/eglot-20221020.1010/eglot hides /usr/sh= are/emacs/30.0.50/lisp/progmodes/eglot=0A/home/tralph3/.local/share/emacs= /elpa/xref-1.6.2/xref hides /usr/share/emacs/30.0.50/lisp/progmodes/xref= =0A=0AFeatures:=0A(shadow sort mail-extr emacsbug rect pong novice shortd= oc bug-hunter=0Ahelp-fns radix-tree cl-print disp-table tetris gamegrid m= ule-util=0Amagit-bookmark bookmark time eglot array jsonrpc ert pp ewoc d= ebug=0Abacktrace find-func xref flymake-proc flymake project org-faces=0A= org-version org-macs which-key dashboard dashboard-widgets all-the-icons= =0Aall-the-icons-faces data-material data-weathericons data-octicons=0Ada= ta-fileicons data-faicons data-alltheicons recentf tree-widget=0Awid-edit= ffap orderless magit-submodule magit-obsolete magit-blame=0Amagit-stash = magit-reflog magit-bisect magit-push magit-pull magit-fetch=0Amagit-clone= magit-remote magit-commit magit-sequence magit-notes=0Amagit-worktree ma= git-tag magit-merge magit-branch magit-reset=0Amagit-files magit-refs mag= it-status magit magit-repos magit-apply=0Amagit-wip magit-log which-func = imenu magit-diff smerge-mode diff=0Adiff-mode git-commit log-edit message= sendmail yank-media puny dired=0Adired-loaddefs rfc822 mml mml-sec epa d= erived epg rfc6068 epg-config=0Agnus-util time-date mm-decode mm-bodies m= m-encode mail-parse rfc2231=0Arfc2047 rfc2045 mm-util ietf-drums mail-prs= vr mailabbrev mail-utils=0Agmm-utils mailheader pcvs-util add-log magit-c= ore magit-autorevert=0Aautorevert filenotify magit-margin magit-transient= magit-process=0Awith-editor shell pcomplete server magit-mode transient = magit-git=0Amagit-base magit-section format-spec crm dash edmacro kmacro= =0Ause-package-bind-key bind-key easy-mmode vertico-mouse vertico=0Arust-= utils thingatpt rust-mode rust-rustfmt rust-playpen rust-compile=0Acompil= e text-property-search comint ansi-osc ansi-color rust-cargo=0Akind-icon = svg-lib color svg dom xml corfu-popupinfo corfu compat=0Acompat-29 use-pa= ckage-ensure use-package-core pixel-scroll cua-base ring=0Acomp comp-cstr= warnings icons rx cl-extra help-mode display-line-numbers=0Apcase bug-hu= nter-autoloads neotree-autoloads org-bullets-autoloads=0Awhich-key-autolo= ads markdown-mode-autoloads dashboard-autoloads info=0Apackage browse-url= url url-proxy url-privacy url-expand url-methods=0Aurl-history url-cooki= e generate-lisp-file url-domsuf url-util mailcap=0Aurl-handlers url-parse= auth-source cl-seq eieio eieio-core cl-macs=0Apassword-cache json subr-x= map byte-opt gv bytecomp byte-compile=0Aurl-vars cl-loaddefs cl-lib rmc = iso-transl tooltip cconv eldoc paren=0Aelectric uniquify ediff-hook vc-ho= oks lisp-float-type elisp-mode mwheel=0Aterm/pgtk-win pgtk-win term/commo= n-win pgtk-dnd tool-bar dnd fontset=0Aimage regexp-opt fringe tabulated-l= ist replace newcomment text-mode=0Alisp-mode prog-mode register page tab-= bar menu-bar rfn-eshadow isearch=0Aeasymenu timer select scroll-bar mouse= jit-lock font-lock syntax=0Afont-core term/tty-colors frame minibuffer n= advice seq simple cl-generic=0Aindonesian philippine cham georgian utf-8-= lang misc-lang vietnamese=0Atibetan thai tai-viet lao korean japanese euc= jp-ms cp51932 hebrew greek=0Aromanian slovak czech european ethiopic indi= an cyrillic chinese=0Acomposite emoji-zwj charscript charprop case-table = epa-hook=0Ajka-cmpr-hook help abbrev obarray oclosure cl-preloaded button= loaddefs=0Atheme-loaddefs faces cus-face macroexp files window text-prop= erties=0Aoverlay sha1 md5 base64 format env code-pages mule custom widget= keymap=0Ahashtable-print-readable backquote threads dbusbind inotify=0Ad= ynamic-setting system-font-setting font-render-setting cairo gtk pgtk=0Al= cms2 multi-tty make-network-process native-compile emacs)=0A=0AMemory inf= ormation:=0A((conses 16 319167 94405)=0A (symbols 48 21107 3)=0A (strings= 32 87375 4726)=0A (string-bytes 1 3487955)=0A (vectors 16 53395)=0A (vec= tor-slots 8 1061140 40998)=0A (floats 8 774 1186)=0A (intervals 56 2980 5= 34)=0A (buffers 984 30)) ----=_RainLoop_248_271416756.1679513721 Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable
W= henever I try to run tetris, or snake, or pong, I get "arithmetic overflo= w error". After digging a bit, I found where the issue lies. This functio= n:

(defun gamegrid-calculate-glyph-size ()
"Calculate appropr= iate glyph size in pixels based on display resolution.
Return a multi= ple of 8 no less than 16."
(let ((atts (frame-monitor-attributes)) y-pitch)
(setq y-pitch (cond
(atts
(/ (nth 4 (assq 'geometr= y atts))
(nth 2 (assq 'mm-size atts))
(or (cdr (assq 'scale-facto= r atts)) 1.0)))
((and (display-pixel-height) (display-mm-height))
= (/ (display-pixel-height) (float (display-mm-height))))))
(if y-pitc= h
(let* ((pixels (* y-pitch gamegrid-glyph-height-mm))
(rounded (= * (floor (/ (+ pixels 4) 8)) 8)))
(max 16 rounded))
16)))

= Is the one causing the error. Where in particular? This section:

= (/ (nth 4 (assq 'geometry atts))
(nth 2 (assq 'mm-size atts))

= What's the issue here? `(assq 'mm-size atts)` returns 0. For some reason,= emacs can't seem to get my monitor size in milimeters. I have tried this= on two different laptops, they both return proper values. This is happen= ing on my desktop, where it fails.

I am using Wayland (with Hyprla= nd) and the PGTK version of emacs, which likely has something to do with = this. This is what `frame-monitor-attributes` returns for me:

((n= ame . "HDMI") (geometry 0 0 1920 1080) (workarea 0 0 1920 1080) (mm-size = 0 0) (scale-factor . 1.0) (frames #<frame *scratch* - GNU Emacs at Rai= nbow 0x55799b79aa48> #<frame 0x55799d4561e0>) (source . "Gdk"))<= br>
As you can see, the `mm-size` is 0, so emacs divides by zero. Amaz= ingly, this is not what causes the error, the variable simply gets set to= infinity. The error comes later, when it tries to multiply by infinity. = Oh lord.

This is what emacs outputs on my laptop for the same `fra= me-monitor-attributes`. Note that my laptop runs the exact same setup, it= also runs Hyprland, it also runs emacs with PGTK, it uses the same confi= g for everything since I have the same dotifles repo cloned in both syste= ms:

((name . "0x0335") (geometry 0 0 1366 768) (workarea 0 0 1366= 768) (mm-size 310 170) (scale-factor . 1.0) (frames #<frame *scratch*= - GNU Emacs at T430 0x55c4c1cdad20> #<frame 0x55c4c356b7e0>) (s= ource . "Gdk"))

This time, the `mm-size` gets properly calculated.=

So something is funky with `frame-monitor-attributes`. Any direct= ion on
how I can further debug this would be appreciated.


<= br>In GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version
3= .24.37, cairo version 1.17.8) of 2023-03-21 built on Rainbow
Repositor= y revision: 42fba8f36b19536964d6deb6a34f3fd1c02b43dd
Repository branch= : makepkg
System Description: Arch Linux

Configured using:
= 'configure --prefix=3D/usr --sysconfdir=3D/etc --libexecdir=3D/usr/lib --localstatedir=3D/var --mandir=3D/usr/share/man --with-gameuser=3D:gam= es
--with-modules --without-libotf --without-m17n-flt --without-gconf=
--with-native-compilation=3Dyes --with-native-compilation=3Daot
= --with-xinput2 --with-pgtk --without-xaw3d --with-sound=3Dalsa
--with= -tree-sitter --without-gpm --without-compress-install
'--program-tran= sform-name=3Ds/\([ec]tags\)/\1.emacs/'
'CFLAGS=3D-march=3Dx86-64 -mtu= ne=3Dgeneric -O2 -pipe -fno-plt -fexceptions
-Wp,-D_FORTIFY_SOURCE=3D= 2 -Wformat -Werror=3Dformat-security
-fstack-clash-protection -fcf-pr= otection'
LDFLAGS=3D-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now= '

Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNU= TLS GSETTINGS HARFBUZZ JPEG JSON
LCMS2 LIBSYSTEMD LIBXML2 MODULES NATI= VE_COMP NOTIFY INOTIFY PDUMPER PGTK
PNG RSVG SECCOMP SOUND SQLITE3 THR= EADS TIFF TOOLKIT_SCROLL_BARS
TREE_SITTER WEBP XIM GTK3 ZLIB

Im= portant settings:
value of $LANG: en_US.UTF-8
locale-coding-syste= m: utf-8-unix

Major mode: Lisp Interaction

Minor modes in e= ffect:
which-key-mode: t
recentf-mode: t
global-git-commit-mo= de: t
magit-auto-revert-mode: t
shell-dirtrack-mode: t
overri= de-global-mode: t
vertico-mouse-mode: t
vertico-mode: t
corfu= -popupinfo-mode: t
global-corfu-mode: t
corfu-mode: t
pixel-s= croll-precision-mode: t
global-display-line-numbers-mode: t
displ= ay-line-numbers-mode: t
tooltip-mode: t
global-eldoc-mode: t
= eldoc-mode: t
show-paren-mode: t
electric-indent-mode: t
mous= e-wheel-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t=
font-lock-mode: t
blink-cursor-mode: t
line-number-mode: t transient-mark-mode: t
auto-composition-mode: t
auto-encryptio= n-mode: t
auto-compression-mode: t

Load-path shadows:
/home= /tralph3/.local/share/emacs/elpa/jsonrpc-1.0.16/jsonrpc hides /usr/share/= emacs/30.0.50/lisp/jsonrpc
/home/tralph3/.local/share/emacs/elpa/trans= ient-20230304.1149/transient hides /usr/share/emacs/30.0.50/lisp/transien= t
/home/tralph3/.local/share/emacs/elpa/use-package-20230203.2004/use-= package hides /usr/share/emacs/30.0.50/lisp/use-package/use-package
/h= ome/tralph3/.local/share/emacs/elpa/use-package-20230203.2004/use-package= -core hides /usr/share/emacs/30.0.50/lisp/use-package/use-package-core/home/tralph3/.local/share/emacs/elpa/use-package-20230203.2004/use-pack= age-jump hides /usr/share/emacs/30.0.50/lisp/use-package/use-package-jump=
/home/tralph3/.local/share/emacs/elpa/use-package-20230203.2004/use-p= ackage-bind-key hides /usr/share/emacs/30.0.50/lisp/use-package/use-packa= ge-bind-key
/home/tralph3/.local/share/emacs/elpa/use-package-20230203= .2004/use-package-delight hides /usr/share/emacs/30.0.50/lisp/use-package= /use-package-delight
/home/tralph3/.local/share/emacs/elpa/use-package= -20230203.2004/use-package-diminish hides /usr/share/emacs/30.0.50/lisp/u= se-package/use-package-diminish
/home/tralph3/.local/share/emacs/elpa/= bind-key-20230203.2004/bind-key hides /usr/share/emacs/30.0.50/lisp/use-p= ackage/bind-key
/home/tralph3/.local/share/emacs/elpa/use-package-2023= 0203.2004/use-package-lint hides /usr/share/emacs/30.0.50/lisp/use-packag= e/use-package-lint
/home/tralph3/.local/share/emacs/elpa/use-package-2= 0230203.2004/use-package-ensure hides /usr/share/emacs/30.0.50/lisp/use-p= ackage/use-package-ensure
/home/tralph3/.local/share/emacs/elpa/projec= t-0.9.8/project hides /usr/share/emacs/30.0.50/lisp/progmodes/project
= /home/tralph3/.local/share/emacs/elpa/eglot-20221020.1010/eglot hides /us= r/share/emacs/30.0.50/lisp/progmodes/eglot
/home/tralph3/.local/share/= emacs/elpa/xref-1.6.2/xref hides /usr/share/emacs/30.0.50/lisp/progmodes/= xref

Features:
(shadow sort mail-extr emacsbug rect pong novice= shortdoc bug-hunter
help-fns radix-tree cl-print disp-table tetris ga= megrid mule-util
magit-bookmark bookmark time eglot array jsonrpc ert = pp ewoc debug
backtrace find-func xref flymake-proc flymake project or= g-faces
org-version org-macs which-key dashboard dashboard-widgets all= -the-icons
all-the-icons-faces data-material data-weathericons data-oc= ticons
data-fileicons data-faicons data-alltheicons recentf tree-widge= t
wid-edit ffap orderless magit-submodule magit-obsolete magit-blamemagit-stash magit-reflog magit-bisect magit-push magit-pull magit-fetch=
magit-clone magit-remote magit-commit magit-sequence magit-notes
m= agit-worktree magit-tag magit-merge magit-branch magit-reset
magit-fil= es magit-refs magit-status magit magit-repos magit-apply
magit-wip mag= it-log which-func imenu magit-diff smerge-mode diff
diff-mode git-comm= it log-edit message sendmail yank-media puny dired
dired-loaddefs rfc8= 22 mml mml-sec epa derived epg rfc6068 epg-config
gnus-util time-date = mm-decode mm-bodies mm-encode mail-parse rfc2231
rfc2047 rfc2045 mm-ut= il ietf-drums mail-prsvr mailabbrev mail-utils
gmm-utils mailheader pc= vs-util add-log magit-core magit-autorevert
autorevert=20filenotify ma= git-margin magit-transient magit-process
with-editor shell pcomplete s= erver magit-mode transient magit-git
magit-base magit-section format-s= pec crm dash edmacro kmacro
use-package-bind-key bind-key easy-mmode v= ertico-mouse vertico
rust-utils thingatpt rust-mode rust-rustfmt rust-= playpen rust-compile
compile text-property-search comint ansi-osc ansi= -color rust-cargo
kind-icon svg-lib color svg dom xml corfu-popupinfo = corfu compat
compat-29 use-package-ensure use-package-core pixel-scrol= l cua-base ring
comp comp-cstr warnings icons rx cl-extra help-mode di= splay-line-numbers
pcase bug-hunter-autoloads neotree-autoloads org-bu= llets-autoloads
which-key-autoloads markdown-mode-autoloads dashboard-= autoloads info
package browse-url url url-proxy url-privacy url-expand= url-methods
url-history url-cookie generate-lisp-file url-domsuf url-= util mailcap
url-handlers url-parse auth-source cl-seq eieio eieio-cor= e cl-macs
password-cache json subr-x map byte-opt gv bytecomp byte-com= pile
url-vars cl-loaddefs cl-lib rmc iso-transl tooltip cconv eldoc pa= ren
electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode m= wheel
term/pgtk-win pgtk-win term/common-win pgtk-dnd tool-bar dnd fon= tset
image regexp-opt fringe tabulated-list replace newcomment text-mo= de
lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isea= rch
easymenu timer select scroll-bar mouse jit-lock font-lock syntaxfont-core term/tty-colors frame minibuffer nadvice seq simple cl-generi= c
indonesian philippine cham georgian utf-8-lang misc-lang vietnamese<= br>tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew gree= k
romanian slovak czech european ethiopic indian cyrillic chinese
c= omposite emoji-zwj charscript charprop case-table epa-hook
jka-cmpr-ho= ok help abbrev obarray oclosure cl-preloaded button loaddefs
theme-loa= ddefs faces cus-face macroexp files window text-properties
overlay sha= 1 md5 base64 format env code-pages mule custom widget keymap
hashtable= -print-readable backquote threads dbusbind inotify
dynamic-setting sys= tem-font-setting font-render-setting cairo gtk pgtk
lcms2 multi-tty ma= ke-network-process native-compile emacs)

Memory information:
((= conses 16 319167 94405)
(symbols 48 21107 3)
(strings 32 87375 47= 26)
(string-bytes 1 3487955)
(vectors 16 53395)
(vector-slots= 8 1061140 40998)
(floats 8 774 1186)
(intervals 56 2980 534)
= (buffers 984 30))
----=_RainLoop_248_271416756.1679513721--