all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* frame-pixel-width returns incorrect value (CVS Emacs on Windows XP)
@ 2008-09-07  4:00 Francis Litterio
  2008-09-07  9:37 ` martin rudalics
  0 siblings, 1 reply; 2+ messages in thread
From: Francis Litterio @ 2008-09-07  4:00 UTC (permalink / raw)
  To: emacs-devel

Using CVS Emacs on Windows XP, evaluate the below form in a frame that
is _not_ currently 60 columns wide by 20 rows high.  The values in the
resulting list are equal, but they should not be.

   (let ((origwidth (frame-pixel-width (selected-frame))))
     (modify-frame-parameters nil '((width . 60) (height . 20)))
     ;;(sit-for 0)
     (list origwidth (frame-pixel-width (selected-frame))))

If you uncomment the call to sit-for, the values in the resulting list
are different (as they should be).

It appears that the second call to frame-pixel-width is unaware of the
change to the width of the frame made by modify-frame-parameters.

The same problem happens with frame-pixel-height.  I don't know if this
is unique to Windows, since I don't have access to a Linux box right now.
--
Fran




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

* Re: frame-pixel-width returns incorrect value (CVS Emacs on Windows XP)
  2008-09-07  4:00 frame-pixel-width returns incorrect value (CVS Emacs on Windows XP) Francis Litterio
@ 2008-09-07  9:37 ` martin rudalics
  0 siblings, 0 replies; 2+ messages in thread
From: martin rudalics @ 2008-09-07  9:37 UTC (permalink / raw)
  To: Francis Litterio; +Cc: emacs-devel

 > Using CVS Emacs on Windows XP, evaluate the below form in a frame that
 > is _not_ currently 60 columns wide by 20 rows high.  The values in the
 > resulting list are equal, but they should not be.
 >
 >    (let ((origwidth (frame-pixel-width (selected-frame))))
 >      (modify-frame-parameters nil '((width . 60) (height . 20)))
 >      ;;(sit-for 0)
 >      (list origwidth (frame-pixel-width (selected-frame))))
 >
 > If you uncomment the call to sit-for, the values in the resulting list
 > are different (as they should be).
 >
 > It appears that the second call to frame-pixel-width is unaware of the
 > change to the width of the frame made by modify-frame-parameters.
 >
 > The same problem happens with frame-pixel-height.  I don't know if this
 > is unique to Windows, since I don't have access to a Linux box right now.

We could add something like

    This is updated by redisplay, when it runs to completion.
    Simply modifying a frame parameter does not update this value.

to the doc-string just as we do with `window-end'.

martin




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

end of thread, other threads:[~2008-09-07  9:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-07  4:00 frame-pixel-width returns incorrect value (CVS Emacs on Windows XP) Francis Litterio
2008-09-07  9:37 ` martin rudalics

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.