emacs-devel
[Top][All Lists]
Advanced

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

Re: how could the mighty emacs lack --fullscreen ?


From: Jan D.
Subject: Re: how could the mighty emacs lack --fullscreen ?
Date: Wed, 26 Dec 2001 03:34:50 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.7+) Gecko/20011221

Richard Stallman wrote:

    I'll have a look.  One must move the settings of hints before the window is
    mapped, since some window managers don't check positions and size after
    mapping (twm, kde1, ...).

I don't follow the reasoning here--could you explain?  Why isn't it
enough just to figure out the proper sizes and put them on
initial-frame-alist?  Sam Steinberg's message seems to suggest that it
is.



First, let me say I was (partly) wrong here. Emacs does indeed set hints before mapping the window. It also sets hints after mapping (in the toolkit version at least), that confused me.

Sam wanted this:


(/ (- (display-pixel-height)                        ; got this
     (title-bar-pixel-height)                      ; WM-specific
     (* (menu-bar-pixel-height)                    ; ??
        (frame-parameter ?? 'menu-bar-lines))
     (* (tool-bar-pixel-height)                    ; ??
        (frame-parameter ?? 'tool-bar-lines)))
  (font--pixel-height (frame-parameter ?? 'font))) ; ??

The problem is the "(title-bar-pixel-height)". There is just no way in X (I like X, but in this case it sucks) to find out this before mapping the window.

If you map the window with NorthWest gravity and at (0,0) you can find out (with translate coordinates) the size of the title bar and the size of the left side decoration (I've used this on other projects, I think it is a standard way of doing things).

So the problem is that the proper sizes is not known before you map a window, in Emacs terms create a frame, by then it is too late to set initial-frame-alist.

Also, note that menu-bar-lines in the toolkit version does not mean what it says. It really only means on or off.


        Jan D.










reply via email to

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