[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#38146: 26.1; set-frame-width sometimes does not work on OSX
From: |
martin rudalics |
Subject: |
bug#38146: 26.1; set-frame-width sometimes does not work on OSX |
Date: |
Sun, 10 Nov 2019 11:01:26 +0100 |
> When I do:
>
> $ emacs -Q -l frame.el
>
> where frame.el consists of the forms:
>
> (defface item-frame
> '((((class color))
> (:family "DejaVu Sans Mono"
> :height 151)))
> "Face for frame to demonstrate the issue.")
>
> (progn
> (set-frame-font (face-font 'item-frame))
> (set-frame-width nil 102)
> (set-frame-position nil
> (/ (- (display-pixel-width) (frame-pixel-width)) 2)
> (cdr (frame-position))))
>
> and then, in the resulting Emacs instance, do:
>
> M-: (frame-width) RET
>
> I get: 80.
>
> However, the expected result is 102, because the form
> (set-frame-width nil 102) above sets the frame width to 102.
>
> I get the expected value of 102 if I remove the call to
> set-frame-position. This is unexpected, because whether
> set-frame-position is called should not influence the frame width.
>
> When I evaluate the form (set-frame-width nil 102) in the resulting
> Emacs instance, the frame width is set to 102 as expected.
Here I get 102, for example with a GNUstep build on Debian. The
behavior you see is OS and window manager dependent. Sometimes
setting all desired values in one 'modify-frame-parameters' call
helps.
martin