bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#21415: 25.0.50; Emacs Trunk -- pixelwise width/height for x-create-f


From: martin rudalics
Subject: bug#21415: 25.0.50; Emacs Trunk -- pixelwise width/height for x-create-frame
Date: Thu, 10 Sep 2015 08:57:25 +0200

> The patch of `nsterm.m` has repaired much of the functionality of
> `frame-inhibit-implied-resize`.  The two tests that previously failed
> now work as expected:
>
>       1.  From a maximized frame, I can change the `font` to Courier
>           18 using `set-face-attribute` and there is no need to set
>           `frame-inhibit-implied-resize` in that circumstance.

I'm afraid that setting ‘frame-inhibit-implied-resize’ would't have
helped anyway in that case.

>       2.  From a frame that is smaller than the screen size, I can use
>           `set-face-attribute` to change the font to Courier 18
>           provided that `frame-inhibit-implied-resize` is set to `t`.

OK.  Together with the two I sent earlier I attach one additional
change, this time for the tool bar.  You don't use it, so it shouldn't
affect you.  Nevertheless keep it included, it might have side effects.

> The problem I am having is with a situation where
> `ns-auto-hide-menu-bar` is set to `t`.  As previously noted in this
> thread, the `top` frame parameter is ignored when making a new frame
> that is the size of the screen -- the new frame appears substantially
> above the top of the display -- i.e., one-half out of sight.  When the
> new frame is partially above the top of the screen,
> `set-face-attribute` substantially enlarges the frame even though
> `frame-inhibit-implied-resize` is set to `t`.  When the frame comes
> back into full view (e.g., top 0, left 0), it is then possible to
> apply `set-face-attribute` without altering the dimensions of the
> frame.  The following are two examples -- one example works, the other
> example is broken -- both rely upon `ns-auto-hide-menu-bar` being set
> to `t`.
>
> (setq ns-auto-hide-menu-bar t)
>
> ;; WORKS
> (let* (
>      (frame-inhibit-implied-resize t)
>      (frame
>        (make-frame '(
>           (vertical-scroll-bars)
>           (left-fringe . 8)
>           (right-fringe . 8)
>           (width . 1259.0)
>           (height . 771.0)
>           (tool-bar-lines . 0)))) )
>    (set-frame-position frame 0 0)
>    (set-face-attribute 'default frame :font 
"-*-Courier-normal-normal-normal-*-18-*-*-*-m-0-iso10646-1"))
>
> ;; BROKEN
> (let* (
>      (frame-inhibit-implied-resize t)
>      (frame
>        (make-frame '(
>          (font . "-*-Courier-normal-normal-normal-*-18-*-*-*-m-0-iso10646-1")
>          (vertical-scroll-bars)
>          (left-fringe . 8)
>          (right-fringe . 8)
>          (width . 1259.0)
>          (height . 771.0)
>          (tool-bar-lines . 0)))) )
>    (set-frame-position frame 0 0))

I have no idea what this small segment in nsterm.m

  if (ns_menu_bar_should_be_hidden ())
    return frameRect;

is meant to accomplish.  Try to comment it out and see what happens.  If
you see a difference, we'll have to look into it.

martin

Attachment: Keith.diff
Description: Text document


reply via email to

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