unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Adapting to changing X display size while Emacs is running
@ 2015-01-13 21:44 Ludwig, Mark
  0 siblings, 0 replies; 2+ messages in thread
From: Ludwig, Mark @ 2015-01-13 21:44 UTC (permalink / raw)
  To: help-gnu-emacs@gnu.org

Greetings,

Is there any way to get the current dimensions of the X
display on which Emacs is displaying one or more frames?
I'm looking to adapt to changing display size while Emacs is
running.

I'm actually using eXceed, and not sure if changing display
size is even a standard feature in X, but what I have for
startup geometry looks like:

Emacs*geometry:		141x51-5+5

It's the "-5" part that changes, since it's relative to the
width of the display.  When the display has changed, I'd
like to be able to move the frame accordingly, so it's again
near the right edge of the display.

I've tried using: (set-frame-position frame -5 5)

That doesn't know the current size of the display; it works
off what the size of the display was when Emacs started,
apparently.  This is also apparent in the output of:
(x-display-pixel-width)

Any way to update this without restarting Emacs?

Thanks!
Mark




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

* Re: Adapting to changing X display size while Emacs is running
@ 2015-01-14 21:23 Bernardo
  0 siblings, 0 replies; 2+ messages in thread
From: Bernardo @ 2015-01-14 21:23 UTC (permalink / raw)
  To: Ludwig, Mark, help-gnu-emacs


>
> Is there any way to get the current dimensions of the X

maybe
(x-display-pixel-width)
(x-display-pixel-height)

?



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

end of thread, other threads:[~2015-01-14 21:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-13 21:44 Adapting to changing X display size while Emacs is running Ludwig, Mark
  -- strict thread matches above, loose matches on Subject: below --
2015-01-14 21:23 Bernardo

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