Subject: bug#75936: closed (Re: bug#75936: monitor width reporting)

From: [email-masked] (GNU bug Tracking System)
Date: Sat, 15 Feb 2025 11:23:02 +0000

Your bug report

#75936: monitor width reporting

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
75936: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=75936
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#75936: monitor width reporting
From: Eli Zaretskii <[email-masked]>
To: [email-masked], [email-masked], [email-masked]
Cc: [email-masked]
Date: Sat, 15 Feb 2025 13:21:59 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

> Cc: [email-masked], [email-masked], [email-masked]
> Date: Sun, 02 Feb 2025 16:12:52 +0200
> From: Eli Zaretskii <[email-masked]>
> 
> > From: Po Lu <[email-masked]>
> > Cc: [email-masked],  [email-masked],  [email-masked]
> > Date: Sun, 02 Feb 2025 20:02:48 +0800
> > 
> > Eli Zaretskii <[email-masked]> writes:
> > 
> > >> From: Po Lu <[email-masked]>
> > >> Cc: [email-masked],  [email-masked],  [email-masked]
> > >> Date: Sun, 02 Feb 2025 18:30:31 +0800
> > >> 
> > >> Eli Zaretskii <[email-masked]> writes:
> > >> 
> > >> > So GTK also supports this internally?  Where's the code for that?
> > >> > xfns.c defines monitor attributes only "#ifndef USE_GTK", AFAICT.
> > >> > What did I miss?
> > >> 
> > >> The code that interfaces with GTK is in the DEFUN
> > >> Fx_display_monitor_attributes_list, not x_get_monitor_attributes.
> > >
> > > Thanks.  Does PGTK use that (and thus supports this functionality)?
> > 
> > Yes, although it uses its own copy of the same code.
> 
> Thanks, I've added this to the doc string and the ELisp manual (on the
> emacs-30 branch), and also added XINERAMA and XRANDR to
> system-configuration-features (on the master branch).

No further comments, so I'm now closing this bug.

Subject: monitor width reporting
From: "david" <[email-masked]>
To: [email-masked]
Date: Wed, 29 Jan 2025 17:03:39 -0700
List-Id: <debbugs-submit.debbugs.gnu.org>

This is a bug that caused me some trouble; but mainly it is FYI.  The physical
arrangement is a laptop, which has a 4K screen, driving a single 4K screen.  I
get (still and always) the different results below from two different Emacs
builds.

The items below are:

A: code from a startup file; the messages are debug stuff, normally absent, the
   intention behind the code is to compute the aspect ratio of a single monitor.

B and C: output from two different Emacs builds, see ned and nut directories.
         The different widths matter to me because I am computing a ratio that
         later wreak havoc 8-(  The creation dates probably matter to you.
         Other than the dates I see no way to differentiate between the builds.

 A
  ;; Probably this is not the aspect ratio of the full screen, probably the window manager will keep
  ;; some of the screen for itself.
  (defconst  .emacs-monitor-aspect-ratio
    (let  ((geometry  (assoc  'geometry  (frame-monitor-attributes  (selected-frame))) ))
      (message  (format  "geometry   %s"  geometry))
      (message  (format  "width      %s" (float  (nth  3  geometry))))
      (message  (format  "height     %s" (nth  4  geometry)))
      (message  (format  "pix width  %s" (display-pixel-width)))
      (message  (format  "pix height %s" (display-pixel-height)))
      (message  (format  "mm width   %s" (display-mm-width)))
      (message  (format  "mm height  %s" (display-mm-height)))
      (message  (format  "screens    %s" (display-screens)))
      (message  (format  "attributes %s" (display-monitor-attributes-list)))
      (message  (format  "frame atts  %s" (frame-monitor-attributes)))
      (/  (float  (nth  3  geometry))
          (nth  4  geometry)))
    "*The ratio width/height for the current display screen, calculated in screen pixels.")

 B
    .emacs-emacs-directory:  /home/dajo/ned/emacs-29.3/
geometry   (geometry 0 0 3840 2160)
width      3840.0
height     2160
pix width  7680
pix height 2160
mm width   2032
mm height  572
screens    1
attributes (((name . DP-1) (geometry 0 0 3840 2160) (workarea 0 72 3840 2088) (mm-size 597 336) (frames #<frame *scratch* - GNU Emacs at Aglaea 0x559619a129a8>) (source . XRandR 1.5)) ((name . eDP-1) (geometry 3840 0 3840 2160) (workarea 3840 0 3840 2160) (mm-size 309 173) (frames) (source . XRandR 1.5)))
frame atts  ((name . DP-1) (geometry 0 0 3840 2160) (workarea 0 72 3840 2088) (mm-size 597 336) (frames #<frame *scratch* - GNU Emacs at Aglaea 0x559619a129a8>) (source . XRandR 1.5))

Nepenthes .emacs loading in GNU Emacs 29.3 (build 1, x86_64-pc-linux-gnu, X toolkit, cairo version 1.16.0, Xaw scroll bars)
 of 2024-07-18.

 C
    .emacs-emacs-directory:  /home/dajo/nut/emacs-29.3/
geometry   (geometry 0 0 7680 2160)
width      7680.0
height     2160
pix width  7680
pix height 2160
mm width   2032
mm height  572
screens    1
attributes (((name . combined screen) (geometry 0 0 7680 2160) (workarea 0 72 7680 2088) (mm-size 2032 572) (frames #<frame *scratch* - GNU Emacs at Aglaea 0x5620435c10a8>) (source . fallback)))
frame atts  ((name . combined screen) (geometry 0 0 7680 2160) (workarea 0 72 7680 2088) (mm-size 2032 572) (frames #<frame *scratch* - GNU Emacs at Aglaea 0x5620435c10a8>) (source . fallback))

Nepenthes .emacs loading in GNU Emacs 29.3 (build 3, x86_64-pc-linux-gnu, X toolkit, cairo version 1.16.0, Xaw scroll bars)
 of 2025-01-29.