GNU bug report logs - #38146
26.1; set-frame-width sometimes does not work on OSX

Previous Next

Package: emacs;

Reported by: Markus Triska <triska <at> metalevel.at>

Date: Sat, 9 Nov 2019 09:22:01 UTC

Severity: normal

Found in version 26.1

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: martin rudalics <rudalics <at> gmx.at>
To: Markus Triska <triska <at> metalevel.at>, 38146 <at> debbugs.gnu.org
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




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

Previous Next


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