unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: martin rudalics <rudalics@gmx.at>
To: Markus Triska <triska@metalevel.at>, 38146@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	[thread overview]
Message-ID: <79a46cef-2b63-a175-71e5-8279e48a3815@gmx.at> (raw)
In-Reply-To: <m2v9rtjth2.fsf@metalevel.at>

 > 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





  reply	other threads:[~2019-11-10 10:01 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-09  9:21 bug#38146: 26.1; set-frame-width sometimes does not work on OSX Markus Triska
2019-11-10 10:01 ` martin rudalics [this message]
2021-01-30  7:03   ` Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=79a46cef-2b63-a175-71e5-8279e48a3815@gmx.at \
    --to=rudalics@gmx.at \
    --cc=38146@debbugs.gnu.org \
    --cc=triska@metalevel.at \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).