all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: martin rudalics <rudalics@gmx.at>
To: Robert Pluim <rpluim@gmail.com>
Cc: 31031@debbugs.gnu.org
Subject: bug#31031: 27.0; (elisp) `Position Parameters', floating-point values
Date: Wed, 04 Apr 2018 09:49:26 +0200	[thread overview]
Message-ID: <5AC48386.8040901@gmx.at> (raw)
In-Reply-To: <877epowjq9.fsf@gmail.com>

 >> Can you try fixing that in some consistent manner?  You can find the
 >> corresponding code in x_calc_absolute_position in xterm.c.  BTW, does
 >> it work right when you use the "(- POS)" specification?
 >
 > (modify-frame-parameters nil '((user-position . t) (left .   (- 0))))
 >
 > gives the same offset effect as
 >
 > (modify-frame-parameters nil '((user-position . t) (left .  1.0)))

So we should try fixing (or documenting) the misbehavior of the (- n)
notation first.

 > D'oh. Of course, top is the right parameter to use. With that the
 > frame switches monitor between top and bottom, so that would imply
 > that the same switching should happen for "left". Iʼm undecided so far
 > as to which I think is the "correct" behaviour.

I'm not sure I understand.  Do you mean that when you change the value
of 'left' the frame always stays within the left monitor while when
you change 'top' the frame moves from the upper to the lower monitor
and back?  That would be queer.

 >>> [1]  Not completely to the right, but thatʼs a different issue
 >>
 >> Probably a problem with calculating the decorations.  Does
 >> (frame-geometry) return "reasonable" values for your frame?
 >
 > (display-monitor-attributes-list)
 >    (((name . "XWAYLAND0") (geometry 0 540 3840 2160) (workarea 0 540 3840
 >    2094) (mm-size 350 190) (frames #<frame *unsent wide reply to martin
 >    rudalics* 0x3d5ce80> #<frame *info* 0x89f6ff0> #<frame *scratch* 0x87f1a00>)
 >    (source . "Gdk")))
 >
 > (modify-frame-parameters nil '((user-position . t) (left .  1.0)))
 >
 > (frame-geometry)
 >    ((outer-position 2340 . 1730) (outer-size 1480 . 824)

Hmm ... 2340 + 1480 gives 3820 which is obviously 20 pixels to the
left of 3840.  This clearly went wrong.  Did we _ask_ for 2340 or
2360?

 >    (external-border-size 20 . 20) (outer-border-width . 0)
 >    (title-bar-size 0 . 70) (menu-bar-external . t) (menu-bar-size 0 . 0)
 >    (tool-bar-external . t) (tool-bar-position . top) (tool-bar-size 0
 >    . 0) (internal-border-width . 0))
 >
 > (+ 2340 1480) => 3820, + external-border-size? In any case, visually
 > the frame is not flush right.

Do we anywhere add only one 'external-border-size' instead of two?

 > If I correct the visual aspect:
 >
 > (modify-frame-parameters nil '((left .   (+ 2400))))
 >
 > (frame-geometry)
 >    ((outer-position 2380 . 1586) (outer-size 1480 . 824)
 >    (external-border-size 20 . 20) (outer-border-width . 0)
 >    (title-bar-size 0 . 70) (menu-bar-external . t) (menu-bar-size 0 . 0)
 >    (tool-bar-external . t) (tool-bar-position . top) (tool-bar-size 0
 >    . 0) (internal-border-width . 0))
 >
 > which to me says thereʼs a (-20) error for the outer-position at
 > least.

Why did you ask for 2400 and not for 2360?  If the position value is
too large the window manager might try to fit the frame onto the
screen.  OTOH "correcting" this to 2380 means there are 20 pixels (the
full right external border) missing on the right if not I am missing
something.

BTW is this on a high resolution display?  Would/should we scale
external borders on such a display too?

martin

 > Iʼll take a look at x_calc_absolute_position.

Fine.

Thanks, martin






  parent reply	other threads:[~2018-04-04  7:49 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-02 21:56 bug#31031: 27.0; (elisp) `Position Parameters', floating-point values Drew Adams
2018-04-03  6:46 ` martin rudalics
2018-04-03  8:25   ` Robert Pluim
2018-04-03 10:23     ` martin rudalics
2018-04-03 12:35       ` Robert Pluim
2018-04-03 16:18         ` modify-frame-parameters with floating point offsets Robert Pluim
2018-04-03 21:50           ` Robert Pluim
2018-04-04  7:51             ` martin rudalics
2018-04-04  7:51           ` martin rudalics
2018-04-04  8:54             ` Robert Pluim
2018-04-05  6:59               ` martin rudalics
2018-04-05 14:07                 ` Robert Pluim
2018-04-04  7:49         ` martin rudalics [this message]
2018-04-04 12:07           ` bug#31031: 27.0; (elisp) `Position Parameters', floating-point values Robert Pluim
2018-04-05  7:00             ` martin rudalics
2018-04-05 14:21               ` Robert Pluim
2018-04-06 10:28             ` Robert Pluim
2018-04-06 12:56               ` Eli Zaretskii
2018-04-06 13:09                 ` Robert Pluim
2018-04-06 13:19                   ` Eli Zaretskii
2018-04-03 15:08   ` Drew Adams
2018-04-04  7:51     ` martin rudalics

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

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

  git send-email \
    --in-reply-to=5AC48386.8040901@gmx.at \
    --to=rudalics@gmx.at \
    --cc=31031@debbugs.gnu.org \
    --cc=rpluim@gmail.com \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.