[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: desktop height?
From: |
Phillip Lord |
Subject: |
Re: desktop height? |
Date: |
28 Jan 2003 14:27:38 +0000 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.2.93 |
>>>>> "Bruce" == Bruce Ingalls <bingalls.NO_SPAM@fit-zones.com> writes:
Bruce> Does anyone know a way to calculate the height of the desktop
Bruce> in elisp?
Bruce> I'd like Emacs to start up with maximum height. For that
Bruce> matter, I'd like XEmacs, and various OSes to work.
Bruce> In Linux X Window, the following works reasonably well:
Bruce> (/ (- (x-display-pixel-height) 50) (frame-char-height)))
Bruce> I can get reasonably close with
Bruce> (/ (x-display-pixel-height)
Bruce> (* (/ (font-default-size-for-device) 2) 3))
Bruce> which works in w32 XEmacs as
Bruce> (/ (x-display-pixel-height)
Bruce> (* (/ (string-to-number (font-default-size-for-device)) 2)
Bruce> 3))
Bruce> or w32 Emacs as
Bruce> (/ (x-display-pixel-height) 18)
Bruce> I'd also like to hear of testing on other OSes. If someone
Bruce> has a better solution, please send it! Thanks ahead.
I used to probe the display to get what is effectively a maximised
emacs, on start up. I stopped doing this because probing in this way
misses things like the Gnome toolbar (which I still want to be
visible).
In recent years I've just gone onto setting it by hand.
Cheers
Phil