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: Keith David Bershatsky
Subject: bug#21415: 25.0.50; Emacs Trunk -- pixelwise width/height for x-create-frame
Date: Thu, 10 Sep 2015 11:39:01 -0700

We are in the home-stretch -- i.e., making significant progress!  :)

I applied the latest combined patch named `Keith.diff`.  I didn't see any side 
affects from the latest revision.

Commenting out the following small segment in `nsterm.m` fixes the problem with 
large frames being created partially above the top of the display -- i.e., it 
is no longer necessary to correct the bug by following a `make-frame` with 
`set-frame-position` (to move it squarely onto the screen) when 
`ns-auto-hide-menu-bar` is set to `t`.  As it stands now, the default position 
is `top 0` and `left 0` -- perfect!

   if (ns_menu_bar_should_be_hidden ())
     return frameRect;

I had previously thought that the above-mentioned problem (now fixed) was 
responsible for the frame increasing in size with the example labeled BROKEN.  
I see now that the difference between the WORKING example and the BROKEN 
example is caused by the fact that `frame-after-make-frame` has already run in 
the WORKING example before `set-face-attribute` is called with the `font` 
parameter.  If we modify `x-create-frame-with-faces` by commenting out 
`(face-set-after-frame-default frame parameters)` and move that over to 
`make-frame` following `(frame-after-make-frame frame t)`, then both examples 
work as expected.

I understand that may not be the preferred solution, but at least we know for 
sure that calling `frame-after-make-frame` BEFORE `set-face-attribute` fixes 
the problem with the frame expanding even though `frame-inhibit-implied-resize` 
is set to `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 -- unless `frame-after-make-frame` is called BEFORE 
`set-face-attribute`.
(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)
  )





reply via email to

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