all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#40817: 27.0.91; setting frame parameter '(left - 0) leaves gap to the right under GTK
@ 2020-04-24 13:36 Trevor Spiteri
       [not found] ` <handler.40817.B.15877354202944.ack@debbugs.gnu.org>
  2020-04-24 17:55 ` bug#40817: 27.0.91; setting frame parameter '(left - 0) leaves gap to the right under GTK martin rudalics
  0 siblings, 2 replies; 6+ messages in thread
From: Trevor Spiteri @ 2020-04-24 13:36 UTC (permalink / raw)
  To: 40817

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






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

end of thread, other threads:[~2020-04-29 16:51 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-04-24 13:36 bug#40817: 27.0.91; setting frame parameter '(left - 0) leaves gap to the right under GTK Trevor Spiteri
     [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

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.