unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Perry Smith <pedz@easesoftware.com>
To: emacs-devel@gnu.org
Subject: (x-display-pixel-height)
Date: Wed, 18 May 2022 17:56:33 -0500	[thread overview]
Message-ID: <9A8CEE6D-D021-4B40-8130-C89F51A98F51@easesoftware.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 2254 bytes --]

I’m using a Mac laptop and can plug in a second monitor.

I’m also using two instances of Emacs 28.1.  One I built on macOS with NextStep support.  The other I build on Free BSD with X11 Lucid.

I open the native macOS Emacs normally by double clicking the icon.  I open the Free BSD version by ssh’ing over to the BSD machine, doing `emacs —batch` and then connecting to it via `emacsclient -n -c -e nil -u`.  I end up with a macOS Emacs and a Free BSD Emacs being displayed on my laptop.

I’ve been playing with frames, displays, and monitors and I more or less understand everything I think but I think there is a bug and I have one question.

When I do `(display-monitor-attributes-list)` from the macOS Emacs with the 2nd monitor connected I get this:

```
(
 (
  (geometry 0  0 1920 1080)
  (workarea 0 25 1920 1055)
  (mm-size 478 268)
  (frames #<frame *scratch* 0x14489a030>)
  (source . "NS")
 )
 (
  (geometry 192 1080 1512 982)
  (workarea 192 1080 1512 950)
  (mm-size 301 195)
  (frames)
  (source . "NS")
 )
)
```

The top is the monitor and the bottom is the laptop’s display.  Notice that ‘name is not present.

If I do `(display-pixel-height)` with the monitor attached, I get 2062 which is the sum of the two heights.  If I detach the monitor, I get 982 which is the height of the laptop’s display.  All good.

However, the X11 version does not do this.  I always get 2025.  The output from `(display-monitor-attributes-list)` changes.  With the monitor attached, there are two entries roughly like the one above and when the monitor is not attached, the output is a single entry.

The 2025 appears to be the value when the first window is opened perhaps?  It is the same value as the sum of the heights when the monitor is attached.  And it appears that it is not getting updated when the monitor is detached.  Is this a bug?  If so, I can report it but thought I would check here first.  (I also can’t follow how x_display_pixel_height works but that’s a detail.)

My question pertains to the name of the monitors.  Can I somehow give the monitors names that will last for the life of Emacs?

I hope my descriptions make sense to others.
Thank you for your time,
Perry


[-- Attachment #2: Message signed with OpenPGP --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

             reply	other threads:[~2022-05-18 22:56 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-18 22:56 Perry Smith [this message]
2022-05-19  1:05 ` (x-display-pixel-height) Po Lu
2022-05-19 14:52   ` (x-display-pixel-height) Perry Smith
2022-05-20  1:04     ` (x-display-pixel-height) Po Lu
2022-05-20 16:43       ` ***SPAM*** (x-display-pixel-height) Perry Smith
2022-05-21  1:33         ` Po Lu
2022-05-21  3:19           ` Po Lu
2022-05-21  7:56             ` Eli Zaretskii
2022-05-21  8:24               ` Po Lu
2022-05-21  8:33                 ` Eli Zaretskii
2022-05-21  8:39                   ` Po Lu
2022-05-22  1:35                 ` Po Lu
2022-05-22  5:57                   ` Eli Zaretskii
2022-05-22  6:18                     ` Po Lu

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=9A8CEE6D-D021-4B40-8130-C89F51A98F51@easesoftware.com \
    --to=pedz@easesoftware.com \
    --cc=emacs-devel@gnu.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 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).