emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: x-display-pixel-width/height inconsistency


From: Eli Zaretskii
Subject: Re: x-display-pixel-width/height inconsistency
Date: Sun, 24 Mar 2013 05:53:10 +0200

> Date: Sun, 24 Mar 2013 08:58:29 +0900
> From: YAMAMOTO Mitsuharu <address@hidden>
> Cc: address@hidden
> 
> > I actually think we should always call GetSystemMetrics, and if that
> > returns a failure indication, call the old code.  Testing versions
> > is usually less desirable.
> 
> Could you check GetSystemMetrics safely returns 0 for unknown
> arguments (because I can't test it)?

What else can it do?  Failing for invalid parameters is what Windows
APIs always do.

> > Moreover, your changes touch x-display-mm-width/height as well, so
> > now display-mm-width/height, whose documentation in the ELisp manual
> > doesn't mention multiple terminals at all, will behave differently
> > as well.
> 
> If these functions behave differently among the platforms on
> multi-monitor setups, then they should be named with different
> prefixes (i.e., w32-display-*, ns-display-*.  Note that the current
> behavior is different even between W32 and NS).  Of course, I prefer
> consistent behavior rather than having the different prefix.

That's a different issue.  My point was that your patch should include
changes to doc strings that describe what these functions will do
after the changes are installed.

As for different names, it depends on what we decide to be the
"normative" behavior.

> My whole point is that functions for obtaining properties of each
> physical monitor on multi-monitor setups should be provided as a new
> function (or a new group of functions), rather than abusing the
> existing functions x-display-* on displays primarily designed after
> the notion of X11 "display" or "screen".

No one said that "display" refers to all the monitors on the X11
display.  It could be just a coincidence, since these functions were
written when each X11 display had only one monitor.  And as for
"screen", that term does not appear in the functions' names or in
their doc strings (which talk about "terminal").

> Users would want to know
> several kinds of information about each monitor, such as the geometry
> (including the origin) or the workarea, not just about size in pixels.

The problem of geometry and the origin exists for a single virtual
display as well.

> Tweeking x-display-pixel-width/height in a platform-specific way or
> adding functions such as display-usable-bounds in the NS port without
> considering the whole design for operations on monitors looks rather
> ad hoc to me.

Then please present a design that would make sense, not just an ad-hoc
set of changes to align all the platforms to the X11 behavior.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]