all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Trevor Spiteri <tspiteri@ieee.org>
To: 40817@debbugs.gnu.org
Subject: bug#40817: 27.0.91; setting frame parameter '(left - 0) leaves gap to the right under GTK
Date: Fri, 24 Apr 2020 15:36:50 +0200	[thread overview]
Message-ID: <34de64f4-564b-936a-2728-b9763b475aad@ieee.org> (raw)

If I evaluate this when using GTK

(modify-frame-parameters nil '((left - 0)))

there is a gap to the right of the frame equal to the total size of the
horizontal window decorations.

I tried to debug this and this is what I found. (This is what I think
causes the bug.)

This calls xterm.c:x_set_offset with f->left_pos = 0 and
f->size_hint_flags = XNegative.

This in turn calls xterm.c:x_calc_absolute_position. Here, the edges are
found using Fx_frame_edges ( frame, Qouter_edges), and the width of the
frame *with* decorations is thus used. Then, f->left_pos is set to
display_pixel_width - width_including_decorations + 0.

Back in x_set_offset, x_gtk_use_window_move is used to move the window;
there is a function call to

gtk_window_move (..., f->leftpos / scale, ...)

However, gtk_window_move seems to be correcting for window decorations
itself, so that if we are to use gtk_window_move,
x_calc_absolute_position should have used the width *without* window
decorations.

I can reproduce this in Emacs 26, so it is not an Emacs 27 regression.



In GNU Emacs 27.0.91 (build 1, x86_64-pc-linux-gnu, GTK+ Version
3.24.13, cairo version 1.16.0)
of 2020-04-23 built on desktop
Repository revision: ba6104d1e8db4e8db2f12acaebf092ef579c6632
Repository branch: emacs-27






             reply	other threads:[~2020-04-24 13:36 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-24 13:36 Trevor Spiteri [this message]
     [not found] ` <handler.40817.B.15877354202944.ack@debbugs.gnu.org>
2020-04-24 14:44   ` bug#40817: Acknowledgement (27.0.91; setting frame parameter '(left - 0) leaves gap to the right under GTK) Trevor Spiteri
2020-04-24 17:55 ` bug#40817: 27.0.91; setting frame parameter '(left - 0) leaves gap to the right under GTK martin rudalics
2020-04-29 14:12   ` Robert Pluim
2020-04-29 15:03     ` martin rudalics
2020-04-29 16:51       ` Robert Pluim

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=34de64f4-564b-936a-2728-b9763b475aad@ieee.org \
    --to=tspiteri@ieee.org \
    --cc=40817@debbugs.gnu.org \
    /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.