bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#40817: 27.0.91; setting frame parameter '(left - 0) leaves gap to th


From: Trevor Spiteri
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
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0

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 via email to

[Prev in Thread] Current Thread [Next in Thread]