unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* (x-display-pixel-height)
@ 2022-05-18 22:56 Perry Smith
  2022-05-19  1:05 ` (x-display-pixel-height) Po Lu
  0 siblings, 1 reply; 14+ messages in thread
From: Perry Smith @ 2022-05-18 22:56 UTC (permalink / raw)
  To: emacs-devel

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

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2022-05-22  6:18 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-18 22:56 (x-display-pixel-height) Perry Smith
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

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