GNU bug report logs - #21415
25.0.50; Emacs Trunk -- pixelwise width/height for x-create-frame

Previous Next

Package: emacs;

Reported by: Keith David Bershatsky <esq <at> lawlist.com>

Date: Fri, 4 Sep 2015 17:43:01 UTC

Severity: wishlist

Found in version 25.0.50

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Keith David Bershatsky <esq <at> lawlist.com>
To: martin rudalics <rudalics <at> gmx.at>
Cc: 21415 <at> debbugs.gnu.org
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)
  )




This bug report was last modified 4 years and 251 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.