unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#38146: 26.1; set-frame-width sometimes does not work on OSX
@ 2019-11-09  9:21 Markus Triska
  2019-11-10 10:01 ` martin rudalics
  0 siblings, 1 reply; 3+ messages in thread
From: Markus Triska @ 2019-11-09  9:21 UTC (permalink / raw)
  To: 38146


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.

Thank you for looking into this!

All the best,
Markus


In GNU Emacs 26.1 (build 1, x86_64-apple-darwin15.3.0, X toolkit, Xaw scroll bars)
 of 2018-09-22 built on mt-mb
Windowing system distributor 'The X.Org Foundation', version 11.0.11502000

Configured using:
 'configure --prefix=/opt/local --without-ns --without-dbus
 --without-gconf --without-libotf --without-m17n-flt --without-gpm
 --with-gnutls --with-xml2 --with-modules --infodir
 /opt/local/share/info/emacs --with-x-toolkit=lucid --without-xaw3d
 --without-imagemagick --with-xpm --with-jpeg --with-tiff --with-gif
 --with-png --with-lcms2 --without-rsvg --with-xft 'CFLAGS=-pipe -Os
 -arch x86_64' CPPFLAGS=-I/opt/local/include 'LDFLAGS=-L/opt/local/lib
 -Wl,-headerpad_max_install_names -lfreetype -lfontconfig -Wl,-no_pie
 -arch x86_64''

Configured features:
XPM JPEG TIFF GIF PNG GSETTINGS NOTIFY ACL GNUTLS LIBXML2 FREETYPE XFT
ZLIB TOOLKIT_SCROLL_BARS LUCID X11 MODULES THREADS LCMS2

Important settings:
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix






^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#38146: 26.1; set-frame-width sometimes does not work on OSX
  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
  2021-01-30  7:03   ` Lars Ingebrigtsen
  0 siblings, 1 reply; 3+ messages in thread
From: martin rudalics @ 2019-11-10 10:01 UTC (permalink / raw)
  To: Markus Triska, 38146

 > 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





^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#38146: 26.1; set-frame-width sometimes does not work on OSX
  2019-11-10 10:01 ` martin rudalics
@ 2021-01-30  7:03   ` Lars Ingebrigtsen
  0 siblings, 0 replies; 3+ messages in thread
From: Lars Ingebrigtsen @ 2021-01-30  7:03 UTC (permalink / raw)
  To: martin rudalics; +Cc: Markus Triska, 38146

martin rudalics <rudalics@gmx.at> writes:

> 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.

I guess there's nothing to fix here?  So I'm closing this bug report.
If there's something here that needs work, please respond to the debbugs
address and we'll reopen.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-01-30  7:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2021-01-30  7:03   ` Lars Ingebrigtsen

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).