[Top][All Lists]

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

Re: Emacs's set-frame-size can not work well with gnome-shell?

From: martin rudalics
Subject: Re: Emacs's set-frame-size can not work well with gnome-shell?
Date: Mon, 27 Jan 2020 20:17:48 +0100

> I just noticed that dragging the left border of a normal GTK frame moves
> the right border too here.  So something is rotten.

The reason for this (and I don't know if you've seen it as well) is that
'mouse-resize-frame' consults 'frame-text-height' (and/or
'frame-text-width') in a fairly tight loop and it should not do that.

To reproduce the problem, load the attached foobar.el with emacs -Q
using the command 'reset' to put the frame at some fixed position and
size.  You may have to play with the numbers to get results suitable for
your setup.

The commands 'foo-' and 'foo+' drag the left border a 100 times to the
right or left by three pixels in one step.  The right border should
remain unchanged.  The commands 'bar-' and 'bar+' should do the same
but, in fact, sometimes move the right border as well.  Doing a
'redisplay' or sleeping in between each single movement makes the 'bar'
functions behave more like the 'foo' ones but still not 100%.

The reason might be the way we delay size changes in change_frame_sizes
and eventually process them via do_pending_window_change.  Somehow,
frame size and position can drift apart while we process them and unless
we put some tight synchronization there (via redisplay) or wait long
enough the calculations go wrong.


Attachment: foobar.el
Description: Text Data

reply via email to

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