unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Robert Pluim <rpluim@gmail.com>
To: martin rudalics <rudalics@gmx.at>
Cc: 31031@debbugs.gnu.org
Subject: bug#31031: 27.0; (elisp) `Position Parameters', floating-point values
Date: Thu, 05 Apr 2018 16:21:01 +0200	[thread overview]
Message-ID: <87k1tl68fm.fsf@gmail.com> (raw)
In-Reply-To: <5AC5C981.30700@gmx.at> (martin rudalics's message of "Thu, 05 Apr 2018 09:00:17 +0200")

martin rudalics <rudalics@gmx.at> writes:

>>> 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.
>>
>> I asked for 2400 because if I ask for 2360 the frame is not flush
>> right.
>
> Funny.  There must be some strange calculations going on behind the
> scenes.  Is there some consistency in the sense that your window
> manager never shows the full external border when you want to place it
> at some position on the left or top of the screen?
>

No, I haven't noticed any artifacts like that.

>> I think weʼre getting a -20 offset back from X somewhere when querying
>> the frame size/position.
>
> And the -20 doesn't correspond to what you see on screen because the
> external border is not fully visible.  Right?
>

What there is of the external border is fully visible, since the frame
is not flush right (except when I ask for 2400, that is).

>> If I look at this hunk in
>> x_real_pos_and_offsets:
>>
>> #ifdef USE_XCB
>>        geom = xcb_get_geometry_reply (xcb_conn, geom_cookie, NULL);
>>        if (geom)
>> 	{
>> 	  real_x = geom->x;
>>
>> then real_x there is -20 when the frame is flush left. Should we be
>> using gdk/gtk calls to get the window geometry?
>
> By all means try to check whether these get you better results.  But
> before that you might want to try disabling USE_XCB.  I recall an
> earlier discussion where I strongly doubted the correctness of values
> returned by x_real_pos_and_offsets.

Some of them do seem bogus. disabling USE_XCB has no effect on the
values (I have a vague memory of Xlib using XCB behind the scenes now,
so thatʼs not too surprising)

Iʼll see if I can change the guts of x_real_pos_and_offsets to use
GDK directly, that might fix things.

Robert





  reply	other threads:[~2018-04-05 14:21 UTC|newest]

Thread overview: 15+ 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-04  7:49         ` martin rudalics
2018-04-04 12:07           ` Robert Pluim
2018-04-05  7:00             ` martin rudalics
2018-04-05 14:21               ` Robert Pluim [this message]
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

  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=87k1tl68fm.fsf@gmail.com \
    --to=rpluim@gmail.com \
    --cc=31031@debbugs.gnu.org \
    --cc=rudalics@gmx.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).