all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [ryanmcgeary@hotmail.com: display-pixel behavior changed on Mac OS X]
@ 2007-04-11  4:13 Richard Matthew Stallman
  2007-04-11  8:16 ` YAMAMOTO Mitsuharu
  0 siblings, 1 reply; 9+ messages in thread
From: Richard Matthew Stallman @ 2007-04-11  4:13 UTC (permalink / raw)
  To: emacs-devel

Would people please DTRT, then ack?

------- Start of forwarded message -------
X-Spam-Status: No, score=0.6 required=5.0 tests=FORGED_HOTMAIL_RCVD2,
	UNPARSEABLE_RELAY autolearn=no version=3.1.0
DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta;
	h=domainkey-signature:received:received:message-id:date:from:sender:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition:x-google-sender-auth;
	b=L1rPMxoIQSwFvSqvDzM0uZHhZBwilBHXbuDkLn6eimzdxgElKNzPxkU04N4e+/nuSbUlc0ZQ8INRY9dDfTrcSWZ9JUsRcSMvN4IRPC7sjMrwDfGF4PaW+jBTilV693miu9Qv1HOYKu0v53VfGtKHCd6jebMPuS0sJg5AL/s92WY=
Date: Mon, 9 Apr 2007 15:03:37 -0400
From: "Ryan McGeary" <ryanmcgeary@hotmail.com>
To: bug-gnu-emacs@gnu.org
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Disposition: inline
Subject: display-pixel behavior changed on Mac OS X

I just recently upgraded from 22.0.95 to 22.0.97.
x-display-pixel-width and x-display-pixel-height no longer work as
expected when running two displays.

(x-display-pixel-width) now returns the total width in pixels for all
displays/monitors, not just the main display for the frame.

For example, I have two displays side by side (1920x1200 and
1400x900).  In 22.0.95, x-display-pixel-width returned 1920 as
expected.  Now, 22.0.97 returns 3360 (1920 + 1400).  This was
unexpected and makes it difficult to use these values to auto-maximize
my initial emacs frame to fit the main display.

- --------
In GNU Emacs 22.0.97.1 (i386-apple-darwin8.9.1, Carbon Version 1.6.0)
 of 2007-04-08 on potato.local
Windowing system distributor `Apple Inc.', version 10.4.9
configured using `configure
'--prefix=/Applications/Emacs.app/Contents/Resources' '--with-carbon'
'--without-x' '--libexecdir=/Volumes/Emacs/Emacs.app/Contents/MacOS/libexec'
'CFLAGS=-arch i386 -arch ppc -isysroot /Developer/SDKs/MacOSX10.4u.sdk
- -DUSE_ATSUI -DUSE_MAC_TSM''
- --------

- -Ryan


_______________________________________________
bug-gnu-emacs mailing list
bug-gnu-emacs@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-gnu-emacs
------- End of forwarded message -------

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

* Re: [ryanmcgeary@hotmail.com: display-pixel behavior changed on Mac OS X]
  2007-04-11  4:13 [ryanmcgeary@hotmail.com: display-pixel behavior changed on Mac OS X] Richard Matthew Stallman
@ 2007-04-11  8:16 ` YAMAMOTO Mitsuharu
  2007-04-11 13:06   ` Ryan McGeary
  2007-04-11 23:03   ` Richard Matthew Stallman
  0 siblings, 2 replies; 9+ messages in thread
From: YAMAMOTO Mitsuharu @ 2007-04-11  8:16 UTC (permalink / raw)
  To: rms; +Cc: Ryan McGeary, emacs-devel

>>>>> On Wed, 11 Apr 2007 00:13:36 -0400, Richard Matthew Stallman <rms@gnu.org> said:

> Would people please DTRT, then ack?

> ------- Start of forwarded message ------- 
> I just recently upgraded from 22.0.95 to 22.0.97.
> x-display-pixel-width and x-display-pixel-height no longer work as
> expected when running two displays.

> (x-display-pixel-width) now returns the total width in pixels for
> all displays/monitors, not just the main display for the frame.

> For example, I have two displays side by side (1920x1200 and
> 1400x900).  In 22.0.95, x-display-pixel-width returned 1920 as
> expected.  Now, 22.0.97 returns 3360 (1920 + 1400).  This was
> unexpected and makes it difficult to use these values to
> auto-maximize my initial emacs frame to fit the main display.

> - --------
> In GNU Emacs 22.0.97.1 (i386-apple-darwin8.9.1, Carbon Version
> 1.6.0) of 2007-04-08 on potato.local Windowing system distributor
> `Apple Inc.', version 10.4.9 configured using `configure
> '--prefix=/Applications/Emacs.app/Contents/Resources'
> '--with-carbon' '--without-x'
> '--libexecdir=/Volumes/Emacs/Emacs.app/Contents/MacOS/libexec'
> 'CFLAGS=-arch i386 -arch ppc -isysroot
> /Developer/SDKs/MacOSX10.4u.sdk - -DUSE_ATSUI -DUSE_MAC_TSM''
> - --------

That's not a bug, and the change is for consistency with X11.  The
related thread starts from
http://lists.gnu.org/archive/html/emacs-pretest-bug/2007-03/msg00412.html

				     YAMAMOTO Mitsuharu
				mituharu@math.s.chiba-u.ac.jp

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

* Re: [ryanmcgeary@hotmail.com: display-pixel behavior changed on Mac OS X]
  2007-04-11  8:16 ` YAMAMOTO Mitsuharu
@ 2007-04-11 13:06   ` Ryan McGeary
  2007-04-11 14:47     ` YAMAMOTO Mitsuharu
  2007-04-11 23:03   ` Richard Matthew Stallman
  1 sibling, 1 reply; 9+ messages in thread
From: Ryan McGeary @ 2007-04-11 13:06 UTC (permalink / raw)
  To: YAMAMOTO Mitsuharu; +Cc: rms, emacs-devel

On 4/11/07, YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> wrote:
>
> That's not a bug, and the change is for consistency with X11.  The
> related thread starts from
> http://lists.gnu.org/archive/html/emacs-pretest-bug/2007-03/msg00412.html


Thanks for the explanation. I appreciate the strive for consistency
with X11, but I fear the recent change loses useful functionality in
other areas.

I now understand the terminology difference between display and
framebuffer, but seeing as how "emacs doesn't have a concept to
distinguish multiple framebuffers yet,"  what would be the best way to
determine the dimensions of the main "framebuffer?"  It sounds like
this is no longer possible with the latest change.

David Reitter makes an good point when he says, "What complicates
matters is that multiple monitors may be arranged so that the total
desktop area is not rectangular. Just having information about total
width and height won't be enough."

-Ryan

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

* Re: [ryanmcgeary@hotmail.com: display-pixel behavior changed on Mac OS X]
  2007-04-11 13:06   ` Ryan McGeary
@ 2007-04-11 14:47     ` YAMAMOTO Mitsuharu
  0 siblings, 0 replies; 9+ messages in thread
From: YAMAMOTO Mitsuharu @ 2007-04-11 14:47 UTC (permalink / raw)
  To: ryanmcgeary; +Cc: rms, emacs-devel

>>>>> On Wed, 11 Apr 2007 09:06:14 -0400, "Ryan McGeary" <ryanmcgeary@hotmail.com> said:

> I now understand the terminology difference between display and
> framebuffer, but seeing as how "emacs doesn't have a concept to
> distinguish multiple framebuffers yet," what would be the best way
> to determine the dimensions of the main "framebuffer?"  It sounds
> like this is no longer possible with the latest change.

At least there's no way to do so in a platform-independent way as of
now.

I'm not sure if it always gives the correct result, but you may
possibly get the width and height of the main display (in Mac
terminology) like this:

(let ((main-display-dict
       (aref (aref (mac-get-preference "DisplaySets" "com.apple.windowserver")
		   0) 0)))
  (cons (cdr (assoc "Width" main-display-dict))
	(cdr (assoc "Height" main-display-dict))))

				     YAMAMOTO Mitsuharu
				mituharu@math.s.chiba-u.ac.jp

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

* Re: [ryanmcgeary@hotmail.com: display-pixel behavior changed on Mac OS X]
  2007-04-11  8:16 ` YAMAMOTO Mitsuharu
  2007-04-11 13:06   ` Ryan McGeary
@ 2007-04-11 23:03   ` Richard Matthew Stallman
  2007-04-12  8:29     ` YAMAMOTO Mitsuharu
  1 sibling, 1 reply; 9+ messages in thread
From: Richard Matthew Stallman @ 2007-04-11 23:03 UTC (permalink / raw)
  To: YAMAMOTO Mitsuharu; +Cc: ryanmcgeary, emacs-devel

    That's not a bug, and the change is for consistency with X11.  The
    related thread starts from
    http://lists.gnu.org/archive/html/emacs-pretest-bug/2007-03/msg00412.html

Would someone please update the documentation string of
x-display-pixel-width, and the Emacs Lisp Reference Manual?

What about x-display-pixel-height?  Was it changed in a similar way?

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

* Re: [ryanmcgeary@hotmail.com: display-pixel behavior changed on Mac OS X]
  2007-04-11 23:03   ` Richard Matthew Stallman
@ 2007-04-12  8:29     ` YAMAMOTO Mitsuharu
  2007-04-13  1:41       ` Richard Stallman
  0 siblings, 1 reply; 9+ messages in thread
From: YAMAMOTO Mitsuharu @ 2007-04-12  8:29 UTC (permalink / raw)
  To: rms; +Cc: ryanmcgeary, emacs-devel

>>>>> On Wed, 11 Apr 2007 19:03:52 -0400, Richard Matthew Stallman <rms@gnu.org> said:

> Would someone please update the documentation string of
> x-display-pixel-width, and the Emacs Lisp Reference Manual?

Something like "When the screen spans multiple monitors, the function
returns the width (height) of the whole screen"?  It looks a bit
superfluous to me.

The current documentation string of x-display-pixel-width:

  Returns the width in pixels of the X display DISPLAY.
  The optional argument DISPLAY specifies which display to ask about.
  DISPLAY should be either a frame or a display name (a string).
  If omitted or nil, that stands for the selected frame's display.

The documentation string of display-pixel-width:

  Return the width of DISPLAY's screen in pixels.
  For character terminals, each character counts as a single pixel.

The Emacs Lisp Reference Manual:

 -- Function: display-pixel-width &optional display
     This function returns the width of the screen in pixels.  On a
     character terminal, it gives the width in characters.

> What about x-display-pixel-height?  Was it changed in a similar way?

For Mac OS, yes.  I'm not sure how the W32 port work on such settings.

				     YAMAMOTO Mitsuharu
				mituharu@math.s.chiba-u.ac.jp

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

* Re: [ryanmcgeary@hotmail.com: display-pixel behavior changed on Mac OS X]
  2007-04-12  8:29     ` YAMAMOTO Mitsuharu
@ 2007-04-13  1:41       ` Richard Stallman
  2007-04-13 13:46         ` Stefan Monnier
  2007-04-15 19:43         ` Chong Yidong
  0 siblings, 2 replies; 9+ messages in thread
From: Richard Stallman @ 2007-04-13  1:41 UTC (permalink / raw)
  To: YAMAMOTO Mitsuharu; +Cc: ryanmcgeary, emacs-devel

    > Would someone please update the documentation string of
    > x-display-pixel-width, and the Emacs Lisp Reference Manual?

    Something like "When the screen spans multiple monitors, the function
    returns the width (height) of the whole screen"?  It looks a bit
    superfluous to me.

It is not superfluous to document these primitives correctly.

Would someone who knows precisely what these functions now do
please document them?

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

* Re: [ryanmcgeary@hotmail.com: display-pixel behavior changed on Mac OS X]
  2007-04-13  1:41       ` Richard Stallman
@ 2007-04-13 13:46         ` Stefan Monnier
  2007-04-15 19:43         ` Chong Yidong
  1 sibling, 0 replies; 9+ messages in thread
From: Stefan Monnier @ 2007-04-13 13:46 UTC (permalink / raw)
  To: rms; +Cc: ryanmcgeary, YAMAMOTO Mitsuharu, emacs-devel

>>>>> "Richard" == Richard Stallman <rms@gnu.org> writes:

>> Would someone please update the documentation string of
>> x-display-pixel-width, and the Emacs Lisp Reference Manual?

>     Something like "When the screen spans multiple monitors, the function
>     returns the width (height) of the whole screen"?  It looks a bit
>     superfluous to me.

> It is not superfluous to document these primitives correctly.

> Would someone who knows precisely what these functions now do
> please document them?

I think the most important part is to document the terminology in the
manual to clearly distinguish display/screen/framebuffer/...

And then maybe add a note to every docstring referring to this part of
the manual, like "See <foobar> for the differences between screens,
displays, and frambuffers".


        Stefan

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

* Re: [ryanmcgeary@hotmail.com: display-pixel behavior changed on Mac OS X]
  2007-04-13  1:41       ` Richard Stallman
  2007-04-13 13:46         ` Stefan Monnier
@ 2007-04-15 19:43         ` Chong Yidong
  1 sibling, 0 replies; 9+ messages in thread
From: Chong Yidong @ 2007-04-15 19:43 UTC (permalink / raw)
  To: rms; +Cc: ryanmcgeary, YAMAMOTO Mitsuharu, emacs-devel

Richard Stallman <rms@gnu.org> writes:

>     > Would someone please update the documentation string of
>     > x-display-pixel-width, and the Emacs Lisp Reference Manual?
>
>     Something like "When the screen spans multiple monitors, the function
>     returns the width (height) of the whole screen"?  It looks a bit
>     superfluous to me.
>
> It is not superfluous to document these primitives correctly.
>
> Would someone who knows precisely what these functions now do
> please document them?

Done.

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

end of thread, other threads:[~2007-04-15 19:43 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-04-11  4:13 [ryanmcgeary@hotmail.com: display-pixel behavior changed on Mac OS X] Richard Matthew Stallman
2007-04-11  8:16 ` YAMAMOTO Mitsuharu
2007-04-11 13:06   ` Ryan McGeary
2007-04-11 14:47     ` YAMAMOTO Mitsuharu
2007-04-11 23:03   ` Richard Matthew Stallman
2007-04-12  8:29     ` YAMAMOTO Mitsuharu
2007-04-13  1:41       ` Richard Stallman
2007-04-13 13:46         ` Stefan Monnier
2007-04-15 19:43         ` Chong Yidong

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.