[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
(x-display-pixel-height)
From: |
Perry Smith |
Subject: |
(x-display-pixel-height) |
Date: |
Wed, 18 May 2022 17:56:33 -0500 |
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
signature.asc
Description: Message signed with OpenPGP
- (x-display-pixel-height),
Perry Smith <=
- Re: (x-display-pixel-height), Po Lu, 2022/05/18
- Re: (x-display-pixel-height), Perry Smith, 2022/05/19
- Re: (x-display-pixel-height), Po Lu, 2022/05/19
- Re: ***SPAM*** Re: (x-display-pixel-height), Perry Smith, 2022/05/20
- Re: ***SPAM*** Re: (x-display-pixel-height), Po Lu, 2022/05/20
- Re: ***SPAM*** Re: (x-display-pixel-height), Po Lu, 2022/05/20
- Re: ***SPAM*** Re: (x-display-pixel-height), Eli Zaretskii, 2022/05/21
- Re: ***SPAM*** Re: (x-display-pixel-height), Po Lu, 2022/05/21
- Re: ***SPAM*** Re: (x-display-pixel-height), Eli Zaretskii, 2022/05/21
- Re: ***SPAM*** Re: (x-display-pixel-height), Po Lu, 2022/05/21