Subject: Re: bug#18451: 24.4.50; 'toggle-frame-fullscreen' can cut off minibuffer

From: Matthew Leach <[email-masked]>
Date: Sun, 14 Sep 2014 13:32:23 +0000

Jan Djärv <[email-masked]> writes:

> Hello.

Hi Jan,

[...]

> If you compile Emacs yourself, you can debug this by tracing the
> ConfigureNotify Emacs gets and/or the calls to change_frame_size and
> xg_frame_resized.  Obviously some call is either not made or made with
> the wrong parameters.  It may be a race condition so that Emacs gets
> ConfigureNotify out of sequence.

I have added trace prints in the functions that you suggested and things
do look different when the bug occurs.

The following trace is printed when the resize happens correctly (the
trace seems to be the same between bug-free resize operations).

ConfigureNotify event received.
ConfigureNotify event received.
ConfigureNotify event received.
xg_frame_resized(0x6896f8, 1366, 768);
change_frame_size(0x6896f8, 1350, 768, 0, 1, 0, 1);
change_frame_size(0x6896f8, 1350, 768, 0, 0, 0, 1);
ConfigureNotify event received.
ConfigureNotify event received.
ConfigureNotify event received.
ConfigureNotify event received.
xg_frame_resized(0x6896f8, 679, 729);
change_frame_size(0x6896f8, 663, 729, 0, 1, 0, 1);
change_frame_size(0x6896f8, 663, 729, 0, 0, 0, 1);
ConfigureNotify event received

This is the trace when the bug occurs (again, the trace is consistent
between buggy resize operations):

ConfigureNotify event received.
ConfigureNotify event received.
change_frame_size(0x6896f8, 1350, 768, 0, 1, 0, 1);
ConfigureNotify event received.
ConfigureNotify event received.
change_frame_size(0x6896f8, 1350, 768, 0, 0, 1, 1);
ConfigureNotify event received.
ConfigureNotify event received.
ConfigureNotify event received.
xg_frame_resized(0x6896f8, 679, 729);
change_frame_size(0x6896f8, 663, 729, 0, 1, 0, 1);
change_frame_size(0x6896f8, 663, 729, 0, 0, 0, 1);
ConfigureNotify event received.
ConfigureNotify event received.
xg_frame_resized(0x6896f8, 672, 720);
change_frame_size(0x6896f8, 656, 720, 0, 1, 0, 1);
change_frame_size(0x6896f8, 656, 720, 0, 0, 0, 1);

xg_frame_resized doesn't seem to be called on the buggy trace when entering
full-screen. Any ideas where else I could look?
-- 
Matt