unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#18451: 24.4.50; 'toggle-frame-fullscreen' can cut off minibuffer
@ 2014-09-11 16:20 dev
  2014-09-11 17:33 ` Jan Djärv
  0 siblings, 1 reply; 21+ messages in thread
From: dev @ 2014-09-11 16:20 UTC (permalink / raw)
  To: 18451

[-- Attachment #1: Type: text/plain, Size: 3732 bytes --]

Hello,

On occasion when making Emacs full-screen using the new
'toggle-frame-fullscreen' the mode line will be chopped off as well as
the scroll bars (see attached screenshot).

The bug seems to be non-deterministic as it only happens on occasion.

To reproduce from emacs -q:

'toggle-frame-fullscreen'

Simply rinse and repeat until the bug is seen.

Thanks,
Matt

In GNU Emacs 24.4.50.1 (armv7l-unknown-linux-gnueabihf, GTK+ Version 2.24.24)
 of 2014-09-11 on alarm
Windowing system distributor `The X.Org Foundation', version 11.0.11600000
Configured using:
 `configure --prefix=/usr/local'

Configured features:
XPM JPEG TIFF GIF PNG SOUND GPM DBUS GSETTINGS NOTIFY ACL GNUTLS LIBXML2
FREETYPE XFT ZLIB

Important settings:
  value of $LANG: C
  locale-coding-system: nil

Major mode: Fundamental

Minor modes in effect:
  show-paren-mode: t
  tooltip-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  buffer-read-only: t
  line-number-mode: t

Recent input:
M-x r e p o r t <tab> e <backspace> <backspace> <tab> 
<return>

Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.

Load-path shadows:
/home/matthew/.emacs.d/elpa/emms-20140820.1251/tq hides /usr/local/share/emacs/24.4.50/lisp/emacs-lisp/tq

Features:
(shadow sort gnus-util mail-extr emacsbug message format-spec rfc822 mml
mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev
gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util
mail-prsvr mail-utils smartparens byte-opt dash conf-toplev
conf-ssh-agent conf-windmove windmove conf-whitespace conf-theme
conf-slime slime-repl elp cl-macs cl gv slime-parse bytecomp
byte-compile cconv slime etags arc-mode archive-mode noutline outline
easy-mmode pp hyperspec browse-url conf-faces hl-sexp thingatpt
conf-eshell em-term term disp-table ehelp em-smart pcomplete comint
ansi-color ring esh-var esh-io esh-cmd esh-opt esh-ext esh-proc esh-arg
eldoc esh-groups eshell esh-module esh-mode esh-util conf-erc conf-emms
emms-cache emms-info-ogginfo emms-info-mp3info emms-playlist-mode
emms-player-vlc advice help-fns emms-source-playlist emms-source-file
locate dired emms-player-mplayer emms-playing-time emms-player-simple
emms-info later-do emms-setup emms-mode-line emms emms-compat conf-elisp
conf-packages tex-site slime-autoloads info easymenu package conf-dir
conf-dired conf-c-mode conf-auctex conf-asm conf-ace-jump conf-personal
ido edmacro kmacro cl-loaddefs cl-lib paren time-date tooltip electric
uniquify ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar
dnd fontset image regexp-opt fringe tabulated-list newcomment lisp-mode
prog-mode register page menu-bar rfn-eshadow timer select scroll-bar
mouse jit-lock font-lock syntax facemenu font-core frame cham georgian
utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean
japanese hebrew greek romanian slovak czech european ethiopic indian
cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev
minibuffer nadvice loaddefs button faces cus-face macroexp files
text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget hashtable-print-readable backquote make-network-process
dbusbind gfilenotify dynamic-setting system-font-setting
font-render-setting move-toolbar gtk x-toolkit x multi-tty emacs)

Memory information:
((conses 8 169696 7231)
 (symbols 24 28749 0)
 (miscs 20 96 150)
 (strings 16 46586 5074)
 (string-bytes 1 1252189)
 (vectors 8 21860)
 (vector-slots 4 528797 2716)
 (floats 8 125 223)
 (intervals 28 259 186)
 (buffers 520 12)
 (heap 1024 18836 925))


[-- Attachment #2: 2014-09-11-170842_1366x768_scrot.png --]
[-- Type: image/png, Size: 38807 bytes --]

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

* bug#18451: 24.4.50; 'toggle-frame-fullscreen' can cut off minibuffer
  2014-09-11 16:20 bug#18451: 24.4.50; 'toggle-frame-fullscreen' can cut off minibuffer dev
@ 2014-09-11 17:33 ` Jan Djärv
  2014-09-11 17:52   ` Matthew Leach
  0 siblings, 1 reply; 21+ messages in thread
From: Jan Djärv @ 2014-09-11 17:33 UTC (permalink / raw)
  To: dev; +Cc: 18451

What window manager are you running?

	Jan D.

11 sep 2014 kl. 18:20 skrev dev@mattleach.net:

> Hello,
> 
> On occasion when making Emacs full-screen using the new
> 'toggle-frame-fullscreen' the mode line will be chopped off as well as
> the scroll bars (see attached screenshot).
> 
> The bug seems to be non-deterministic as it only happens on occasion.
> 
> To reproduce from emacs -q:
> 
> 'toggle-frame-fullscreen'
> 
> Simply rinse and repeat until the bug is seen.
> 
> Thanks,
> Matt
> 
> In GNU Emacs 24.4.50.1 (armv7l-unknown-linux-gnueabihf, GTK+ Version 2.24.24)
> of 2014-09-11 on alarm
> Windowing system distributor `The X.Org Foundation', version 11.0.11600000
> Configured using:
> `configure --prefix=/usr/local'
> 
> Configured features:
> XPM JPEG TIFF GIF PNG SOUND GPM DBUS GSETTINGS NOTIFY ACL GNUTLS LIBXML2
> FREETYPE XFT ZLIB
> 
> Important settings:
>  value of $LANG: C
>  locale-coding-system: nil
> 
> Major mode: Fundamental
> 
> Minor modes in effect:
>  show-paren-mode: t
>  tooltip-mode: t
>  electric-indent-mode: t
>  mouse-wheel-mode: t
>  file-name-shadow-mode: t
>  global-font-lock-mode: t
>  blink-cursor-mode: t
>  auto-composition-mode: t
>  auto-encryption-mode: t
>  auto-compression-mode: t
>  buffer-read-only: t
>  line-number-mode: t
> 
> Recent input:
> M-x r e p o r t <tab> e <backspace> <backspace> <tab> 
> <return>
> 
> Recent messages:
> For information about GNU Emacs and the GNU system, type C-h C-a.
> 
> Load-path shadows:
> /home/matthew/.emacs.d/elpa/emms-20140820.1251/tq hides /usr/local/share/emacs/24.4.50/lisp/emacs-lisp/tq
> 
> Features:
> (shadow sort gnus-util mail-extr emacsbug message format-spec rfc822 mml
> mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev
> gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util
> mail-prsvr mail-utils smartparens byte-opt dash conf-toplev
> conf-ssh-agent conf-windmove windmove conf-whitespace conf-theme
> conf-slime slime-repl elp cl-macs cl gv slime-parse bytecomp
> byte-compile cconv slime etags arc-mode archive-mode noutline outline
> easy-mmode pp hyperspec browse-url conf-faces hl-sexp thingatpt
> conf-eshell em-term term disp-table ehelp em-smart pcomplete comint
> ansi-color ring esh-var esh-io esh-cmd esh-opt esh-ext esh-proc esh-arg
> eldoc esh-groups eshell esh-module esh-mode esh-util conf-erc conf-emms
> emms-cache emms-info-ogginfo emms-info-mp3info emms-playlist-mode
> emms-player-vlc advice help-fns emms-source-playlist emms-source-file
> locate dired emms-player-mplayer emms-playing-time emms-player-simple
> emms-info later-do emms-setup emms-mode-line emms emms-compat conf-elisp
> conf-packages tex-site slime-autoloads info easymenu package conf-dir
> conf-dired conf-c-mode conf-auctex conf-asm conf-ace-jump conf-personal
> ido edmacro kmacro cl-loaddefs cl-lib paren time-date tooltip electric
> uniquify ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar
> dnd fontset image regexp-opt fringe tabulated-list newcomment lisp-mode
> prog-mode register page menu-bar rfn-eshadow timer select scroll-bar
> mouse jit-lock font-lock syntax facemenu font-core frame cham georgian
> utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean
> japanese hebrew greek romanian slovak czech european ethiopic indian
> cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev
> minibuffer nadvice loaddefs button faces cus-face macroexp files
> text-properties overlay sha1 md5 base64 format env code-pages mule
> custom widget hashtable-print-readable backquote make-network-process
> dbusbind gfilenotify dynamic-setting system-font-setting
> font-render-setting move-toolbar gtk x-toolkit x multi-tty emacs)
> 
> Memory information:
> ((conses 8 169696 7231)
> (symbols 24 28749 0)
> (miscs 20 96 150)
> (strings 16 46586 5074)
> (string-bytes 1 1252189)
> (vectors 8 21860)
> (vector-slots 4 528797 2716)
> (floats 8 125 223)
> (intervals 28 259 186)
> (buffers 520 12)
> (heap 1024 18836 925))
> 
> <2014-09-11-170842_1366x768_scrot.png>






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

* bug#18451: 24.4.50; 'toggle-frame-fullscreen' can cut off minibuffer
  2014-09-11 17:33 ` Jan Djärv
@ 2014-09-11 17:52   ` Matthew Leach
  2014-09-13  9:55     ` Jan Djärv
  0 siblings, 1 reply; 21+ messages in thread
From: Matthew Leach @ 2014-09-11 17:52 UTC (permalink / raw)
  To: Jan Djärv; +Cc: 18451, dev

Jan Djärv <jan.h.d@swipnet.se> writes:

> What window manager are you running?

I'm currently using i3 version 4.8 (2014-06-15, branch "4.8").

-- 
Matt







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

* bug#18451: 24.4.50; 'toggle-frame-fullscreen' can cut off minibuffer
  2014-09-11 17:52   ` Matthew Leach
@ 2014-09-13  9:55     ` Jan Djärv
  2014-09-13 22:13       ` Matthew Leach
  0 siblings, 1 reply; 21+ messages in thread
From: Jan Djärv @ 2014-09-13  9:55 UTC (permalink / raw)
  To: Matthew Leach; +Cc: 18451, dev

Hello.

11 sep 2014 kl. 19:52 skrev Matthew Leach <matthew@mattleach.net>:

> Jan Djärv <jan.h.d@swipnet.se> writes:
> 
>> What window manager are you running?
> 
> I'm currently using i3 version 4.8 (2014-06-15, branch "4.8").

I could not reproduce this on Fedora 20 with i3.  What system are you running?
Please try with -Q and see if it happes then as well.

	Jan D.







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

* bug#18451: 24.4.50; 'toggle-frame-fullscreen' can cut off minibuffer
  2014-09-13  9:55     ` Jan Djärv
@ 2014-09-13 22:13       ` Matthew Leach
  2014-09-14  9:20         ` Jan Djärv
  0 siblings, 1 reply; 21+ messages in thread
From: Matthew Leach @ 2014-09-13 22:13 UTC (permalink / raw)
  To: Jan Djärv; +Cc: 18451

Jan Djärv <jan.h.d@swipnet.se> writes:

> Hello.
>
> 11 sep 2014 kl. 19:52 skrev Matthew Leach <matthew@mattleach.net>:
>
>> Jan Djärv <jan.h.d@swipnet.se> writes:
>> 
>>> What window manager are you running?
>> 
>> I'm currently using i3 version 4.8 (2014-06-15, branch "4.8").
>
> I could not reproduce this on Fedora 20 with i3.  What system are you running?
> Please try with -Q and see if it happes then as well.

I can't reproduce on my desktop. This may be an ARM-specific issue (the
bug only occurs on my Chromebook). I still see the issue with "emacs
-Q".
-- 
Matt





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

* bug#18451: 24.4.50; 'toggle-frame-fullscreen' can cut off minibuffer
  2014-09-13 22:13       ` Matthew Leach
@ 2014-09-14  9:20         ` Jan Djärv
  2014-09-14 13:32           ` Matthew Leach
  0 siblings, 1 reply; 21+ messages in thread
From: Jan Djärv @ 2014-09-14  9:20 UTC (permalink / raw)
  To: Matthew Leach; +Cc: 18451

Hello.

14 sep 2014 kl. 00:13 skrev Matthew Leach <matthew@mattleach.net>:

> Jan Djärv <jan.h.d@swipnet.se> writes:
> 
>> Hello.
>> 
>> 11 sep 2014 kl. 19:52 skrev Matthew Leach <matthew@mattleach.net>:
>> 
>>> Jan Djärv <jan.h.d@swipnet.se> writes:
>>> 
>>>> What window manager are you running?
>>> 
>>> I'm currently using i3 version 4.8 (2014-06-15, branch "4.8").
>> 
>> I could not reproduce this on Fedora 20 with i3.  What system are you running?
>> Please try with -Q and see if it happes then as well.
> 
> I can't reproduce on my desktop. This may be an ARM-specific issue (the
> bug only occurs on my Chromebook). I still see the issue with "emacs
> -Q".

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.

	Jan D.







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

* bug#18451: 24.4.50; 'toggle-frame-fullscreen' can cut off minibuffer
  2014-09-14  9:20         ` Jan Djärv
@ 2014-09-14 13:32           ` Matthew Leach
  2014-09-16 18:38             ` Jan Djärv
  0 siblings, 1 reply; 21+ messages in thread
From: Matthew Leach @ 2014-09-14 13:32 UTC (permalink / raw)
  To: Jan Djärv; +Cc: 18451

Jan Djärv <jan.h.d@swipnet.se> 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





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

* bug#18451: 24.4.50; 'toggle-frame-fullscreen' can cut off minibuffer
  2014-09-14 13:32           ` Matthew Leach
@ 2014-09-16 18:38             ` Jan Djärv
  2014-09-16 19:16               ` Matthew Leach
  0 siblings, 1 reply; 21+ messages in thread
From: Jan Djärv @ 2014-09-16 18:38 UTC (permalink / raw)
  To: Matthew Leach; +Cc: 18451

Hello.

14 sep 2014 kl. 15:32 skrev Matthew Leach <matthew@mattleach.net>:

> Jan Djärv <jan.h.d@swipnet.se> 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):
> 

The question is where does change_frame_size get called from from if they are not from xg_frame_resized?

As a long shot, try removing this line:

do_pending_window_change (0);

in xg_frame_resized.

	Jan D.


> 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






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

* bug#18451: 24.4.50; 'toggle-frame-fullscreen' can cut off minibuffer
  2014-09-16 18:38             ` Jan Djärv
@ 2014-09-16 19:16               ` Matthew Leach
  2014-09-17 10:02                 ` martin rudalics
  2014-09-17 16:05                 ` Jan Djärv
  0 siblings, 2 replies; 21+ messages in thread
From: Matthew Leach @ 2014-09-16 19:16 UTC (permalink / raw)
  To: Jan Djärv; +Cc: 18451

Hello

Jan Djärv <jan.h.d@swipnet.se> writes:

[...]

> The question is where does change_frame_size get called from from if
> they are not from xg_frame_resized?

Hm, sorry I think there was a problem in my original trace, I've given
it another shot.

Here is a bug-free trace:

Received ConfigureNotify event for frame: 0x6781b0
Received ConfigureNotify event for frame: 0x6781b0
Received ConfigureNotify event for frame: (nil)
xg_frame_resized(0x6781b0, 1366, 768);
configure_frame_size(0x6781b0, 1350, 768, 330584, 1, 0, 1);
configure_frame_size(0x6781b0, 1350, 768, 330584, 0, 0, 1);
Received ConfigureNotify event for frame: 0x6781b0


And a buggy-trace:

Received ConfigureNotify event for frame: 0x6781b0
Received ConfigureNotify event for frame: (nil)
xg_frame_resized(0x6781b0, 1366, 768);
configure_frame_size(0x6781b0, 1350, 768, 330584, 1, 0, 1);
configure_frame_size(0x6781b0, 1350, 768, 330584, 0, 0, 1);
Received ConfigureNotify event for frame: 0x6781b0
Received ConfigureNotify event for frame: 0x6781b0

>
>
> As a long shot, try removing this line:
>
> do_pending_window_change (0);
>
> in xg_frame_resized.

I'm afraid that didn't help.
-- 
Matt





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

* bug#18451: 24.4.50; 'toggle-frame-fullscreen' can cut off minibuffer
  2014-09-16 19:16               ` Matthew Leach
@ 2014-09-17 10:02                 ` martin rudalics
  2014-09-17 10:38                   ` Matthew Leach
  2014-09-17 16:05                 ` Jan Djärv
  1 sibling, 1 reply; 21+ messages in thread
From: martin rudalics @ 2014-09-17 10:02 UTC (permalink / raw)
  To: Matthew Leach, Jan Djärv; +Cc: 18451

Does (setq frame-resize-pixelwise t) change anything?

martin





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

* bug#18451: 24.4.50; 'toggle-frame-fullscreen' can cut off minibuffer
  2014-09-17 10:02                 ` martin rudalics
@ 2014-09-17 10:38                   ` Matthew Leach
  2014-09-18  9:32                     ` martin rudalics
  0 siblings, 1 reply; 21+ messages in thread
From: Matthew Leach @ 2014-09-17 10:38 UTC (permalink / raw)
  To: martin rudalics; +Cc: 18451

Hi Martin,

martin rudalics <rudalics@gmx.at> writes:

> Does (setq frame-resize-pixelwise t) change anything?

I'm afraid not. I'm still seeing the bug after evaluating this form.
-- 
Matt





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

* bug#18451: 24.4.50; 'toggle-frame-fullscreen' can cut off minibuffer
  2014-09-16 19:16               ` Matthew Leach
  2014-09-17 10:02                 ` martin rudalics
@ 2014-09-17 16:05                 ` Jan Djärv
  1 sibling, 0 replies; 21+ messages in thread
From: Jan Djärv @ 2014-09-17 16:05 UTC (permalink / raw)
  To: Matthew Leach; +Cc: 18451

Hello.

16 sep 2014 kl. 21:16 skrev Matthew Leach <matthew@mattleach.net>:

> Hello
> 
> Jan Djärv <jan.h.d@swipnet.se> writes:
> 
> [...]
> 
>> The question is where does change_frame_size get called from from if
>> they are not from xg_frame_resized?
> 
> Hm, sorry I think there was a problem in my original trace, I've given
> it another shot.
> 
> Here is a bug-free trace:
> 
> Received ConfigureNotify event for frame: 0x6781b0
> Received ConfigureNotify event for frame: 0x6781b0
> Received ConfigureNotify event for frame: (nil)
> xg_frame_resized(0x6781b0, 1366, 768);
> configure_frame_size(0x6781b0, 1350, 768, 330584, 1, 0, 1);
> configure_frame_size(0x6781b0, 1350, 768, 330584, 0, 0, 1);
> Received ConfigureNotify event for frame: 0x6781b0
> 
> 
> And a buggy-trace:
> 
> Received ConfigureNotify event for frame: 0x6781b0
> Received ConfigureNotify event for frame: (nil)
> xg_frame_resized(0x6781b0, 1366, 768);
> configure_frame_size(0x6781b0, 1350, 768, 330584, 1, 0, 1);
> configure_frame_size(0x6781b0, 1350, 768, 330584, 0, 0, 1);
> Received ConfigureNotify event for frame: 0x6781b0
> Received ConfigureNotify event for frame: 0x6781b0

Not much difference. I think it is a timing issue between when Emacs sets wm hints and when Emacs resizes its widgets.  These kind of problems are very hard to fix, as they often are timing bugs in the window manager.

> 
>> 
>> 
>> As a long shot, try removing this line:
>> 
>> do_pending_window_change (0);
>> 
>> in xg_frame_resized.
> 
> I'm afraid that didn't help.

Oh well, it was a shot in the dark.

	Jan D.






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

* bug#18451: 24.4.50; 'toggle-frame-fullscreen' can cut off minibuffer
  2014-09-17 10:38                   ` Matthew Leach
@ 2014-09-18  9:32                     ` martin rudalics
  2014-09-18 12:01                       ` Matthew Leach
  0 siblings, 1 reply; 21+ messages in thread
From: martin rudalics @ 2014-09-18  9:32 UTC (permalink / raw)
  To: Matthew Leach; +Cc: 18451

 >> Does (setq frame-resize-pixelwise t) change anything?
 >
 > I'm afraid not. I'm still seeing the bug after evaluating this form.

Just for the record, even if you eval the form when startin Emacs?

 > Hm, sorry I think there was a problem in my original trace, I've given
 > it another shot.
 >
 > Here is a bug-free trace:
 >
 > Received ConfigureNotify event for frame: 0x6781b0
 > Received ConfigureNotify event for frame: 0x6781b0
 > Received ConfigureNotify event for frame: (nil)
 > xg_frame_resized(0x6781b0, 1366, 768);
 > configure_frame_size(0x6781b0, 1350, 768, 330584, 1, 0, 1);
 > configure_frame_size(0x6781b0, 1350, 768, 330584, 0, 0, 1);
 > Received ConfigureNotify event for frame: 0x6781b0
 >
 >
 > And a buggy-trace:
 >
 > Received ConfigureNotify event for frame: 0x6781b0
 > Received ConfigureNotify event for frame: (nil)
 > xg_frame_resized(0x6781b0, 1366, 768);
 > configure_frame_size(0x6781b0, 1350, 768, 330584, 1, 0, 1);
 > configure_frame_size(0x6781b0, 1350, 768, 330584, 0, 0, 1);
 > Received ConfigureNotify event for frame: 0x6781b0
 > Received ConfigureNotify event for frame: 0x6781b0

Sorry, I somehow lost the initial part of this thread.  These two traces
don't document any affect on the minibuffer - the heights (768) are
always the same.  What does `configure_frame_size' stand for?  Are the
traces here in chronological order or reversed?  And how do you get a
ConfigureNotify event for a frame `nil'?

martin





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

* bug#18451: 24.4.50; 'toggle-frame-fullscreen' can cut off minibuffer
  2014-09-18  9:32                     ` martin rudalics
@ 2014-09-18 12:01                       ` Matthew Leach
  2014-09-18 12:41                         ` martin rudalics
  2015-01-04 18:09                         ` martin rudalics
  0 siblings, 2 replies; 21+ messages in thread
From: Matthew Leach @ 2014-09-18 12:01 UTC (permalink / raw)
  To: martin rudalics; +Cc: 18451

Hi Martin,

martin rudalics <rudalics@gmx.at> writes:

>>> Does (setq frame-resize-pixelwise t) change anything?
>>
>> I'm afraid not. I'm still seeing the bug after evaluating this form.
>
> Just for the record, even if you eval the form when startin Emacs?

Actually, I hadn't done that, I just evaluated it in the scratch buffer.
However, when I paste this as the first form in my .emacs it seems to
fix the issue! I've been toggling for about 10 minutes now and haven't
seen an occurrence of the bug.

>
>
>> Hm, sorry I think there was a problem in my original trace, I've given
>> it another shot.
>>
>> Here is a bug-free trace:
>>
>> Received ConfigureNotify event for frame: 0x6781b0
>> Received ConfigureNotify event for frame: 0x6781b0
>> Received ConfigureNotify event for frame: (nil)
>> xg_frame_resized(0x6781b0, 1366, 768);
>> configure_frame_size(0x6781b0, 1350, 768, 330584, 1, 0, 1);
>> configure_frame_size(0x6781b0, 1350, 768, 330584, 0, 0, 1);
>> Received ConfigureNotify event for frame: 0x6781b0
>>
>>
>> And a buggy-trace:
>>
>> Received ConfigureNotify event for frame: 0x6781b0
>> Received ConfigureNotify event for frame: (nil)
>> xg_frame_resized(0x6781b0, 1366, 768);
>> configure_frame_size(0x6781b0, 1350, 768, 330584, 1, 0, 1);
>> configure_frame_size(0x6781b0, 1350, 768, 330584, 0, 0, 1);
>> Received ConfigureNotify event for frame: 0x6781b0
>> Received ConfigureNotify event for frame: 0x6781b0
>
> Sorry, I somehow lost the initial part of this thread.  These two traces
> don't document any affect on the minibuffer - the heights (768) are
> always the same.  What does `configure_frame_size' stand for?  

Oops, configure_frame_size should be `change_frame_size' defined in
dispnew.c

> Are the traces here in chronological order or reversed?  

They are in chronological order.

> And how do you get a ConfigureNotify event for a frame `nil'?

I'm not sure, but it seems to be expected behaviour as there is an
explicit test for it in the ConfigureNotify event handler.  The frame is
set to `any' if x_top_window_to_frame returns null.
-- 
Matt





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

* bug#18451: 24.4.50; 'toggle-frame-fullscreen' can cut off minibuffer
  2014-09-18 12:01                       ` Matthew Leach
@ 2014-09-18 12:41                         ` martin rudalics
  2014-09-18 19:45                           ` Jan Djärv
  2015-01-04 18:09                         ` martin rudalics
  1 sibling, 1 reply; 21+ messages in thread
From: martin rudalics @ 2014-09-18 12:41 UTC (permalink / raw)
  To: Matthew Leach; +Cc: 18451

 >> Just for the record, even if you eval the form when startin Emacs?
 >
 > Actually, I hadn't done that, I just evaluated it in the scratch buffer.

I would have done that in your place too ;-)

 > However, when I paste this as the first form in my .emacs it seems to
 > fix the issue! I've been toggling for about 10 minutes now and haven't
 > seen an occurrence of the bug.

I'm afraid this issue is not only restricted to your window manager and
not only to getting a fullscreen display.  I've recently observed a
similar problem when trying to always come up with the same frame height
with plain emacs -Q on a Gtk build.  On the average it fails every
fourth time with three missing lines.  It does not fail when I set
`frame-resize-pixelwise' to a non-nil value.

 > Oops, configure_frame_size should be `change_frame_size' defined in
 > dispnew.c

I should have figured that out.  Where exactly is your trace point?
Personally I prefer one in change_frame_size_1 where it says

       /* This size-change overrides any pending one for this frame.  */

to avoid that a rescheduled change_frame_size appears in the trace but
it certainly doesn't matter here.

 >> Are the traces here in chronological order or reversed?
 >
 > They are in chronological order.

Good (it's not obvious from the trace alone).  Still I miss things like

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);
xg_frame_resized(0x6781b0, 1366, 768);
configure_frame_size(0x6781b0, 1350, 768, 330584, 1, 0, 1);

from your earlier trace where some height change seems visible.

 >> And how do you get a ConfigureNotify event for a frame `nil'?
 >
 > I'm not sure, but it seems to be expected behaviour as there is an
 > explicit test for it in the ConfigureNotify event handler.  The frame is
 > set to `any' if x_top_window_to_frame returns null.

Arrgh...  I'm too silly.

In any case, the problem could be due to the following:

(1) Due to some non-textual settings (scroll bar, divider, border width)
     we ask the window manager for a frame height which is _not_ an
     integral multiple of the nominal character height.  At the same time
     we ask the window manager to store that nominal height as the
     canonical height by which frame height change increments should be
     allowed.

(2) The window manager (sometimes) decides that our resize request is
     impudent and overrules it by sending us a size that fits the nominal
     height settings.

Jan is our hints expert.  Maybe he has an idea.

martin





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

* bug#18451: 24.4.50; 'toggle-frame-fullscreen' can cut off minibuffer
  2014-09-18 12:41                         ` martin rudalics
@ 2014-09-18 19:45                           ` Jan Djärv
  2014-09-19 10:22                             ` Matthew Leach
  0 siblings, 1 reply; 21+ messages in thread
From: Jan Djärv @ 2014-09-18 19:45 UTC (permalink / raw)
  To: martin rudalics; +Cc: 18451, Matthew Leach


18 sep 2014 kl. 14:41 skrev martin rudalics <rudalics@gmx.at>:

> In any case, the problem could be due to the following:
> 
> (1) Due to some non-textual settings (scroll bar, divider, border width)
>    we ask the window manager for a frame height which is _not_ an
>    integral multiple of the nominal character height.  At the same time
>    we ask the window manager to store that nominal height as the
>    canonical height by which frame height change increments should be
>    allowed.
> 
> (2) The window manager (sometimes) decides that our resize request is
>    impudent and overrules it by sending us a size that fits the nominal
>    height settings.
> 
> Jan is our hints expert.  Maybe he has an idea.


Basically yes.  But with Gtk+ there is an additional complication.  Gtk tries to force the height increments itself if it finds that they aren't met, by resizing windows.  By setting resize pixelwise all hints are basically off so nothing of this happens.  An idea would be to turn hints off if we are going fullsize.

	Jan D.






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

* bug#18451: 24.4.50; 'toggle-frame-fullscreen' can cut off minibuffer
  2014-09-18 19:45                           ` Jan Djärv
@ 2014-09-19 10:22                             ` Matthew Leach
  2014-09-19 11:24                               ` martin rudalics
  2014-09-20  7:18                               ` Jan Djärv
  0 siblings, 2 replies; 21+ messages in thread
From: Matthew Leach @ 2014-09-19 10:22 UTC (permalink / raw)
  To: Jan Djärv; +Cc: 18451

[-- Attachment #1: Type: text/plain, Size: 1355 bytes --]

Jan Djärv <jan.h.d@swipnet.se> writes:

> 18 sep 2014 kl. 14:41 skrev martin rudalics <rudalics@gmx.at>:
>
>> In any case, the problem could be due to the following:
>> 
>> (1) Due to some non-textual settings (scroll bar, divider, border width)
>>    we ask the window manager for a frame height which is _not_ an
>>    integral multiple of the nominal character height.  At the same time
>>    we ask the window manager to store that nominal height as the
>>    canonical height by which frame height change increments should be
>>    allowed.
>> 
>> (2) The window manager (sometimes) decides that our resize request is
>>    impudent and overrules it by sending us a size that fits the nominal
>>    height settings.
>> 
>> Jan is our hints expert.  Maybe he has an idea.
>
>
> Basically yes.  But with Gtk+ there is an additional complication.
> Gtk tries to force the height increments itself if it finds that they
> aren't met, by resizing windows.  By setting resize pixelwise all
> hints are basically off so nothing of this happens.  An idea would be
> to turn hints off if we are going fullsize.

That sounds like a good idea, but I sometimes see the same problem when
coming out of full-screen mode (see attached).  We'd need to disable
hints for enabling and disabling full-screen, would that work?
-- 
Matt


[-- Attachment #2: 2014-09-19-111901_1366x768_scrot.png --]
[-- Type: image/png, Size: 31792 bytes --]

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

* bug#18451: 24.4.50; 'toggle-frame-fullscreen' can cut off minibuffer
  2014-09-19 10:22                             ` Matthew Leach
@ 2014-09-19 11:24                               ` martin rudalics
  2014-09-20  7:18                               ` Jan Djärv
  1 sibling, 0 replies; 21+ messages in thread
From: martin rudalics @ 2014-09-19 11:24 UTC (permalink / raw)
  To: Matthew Leach, Jan Djärv; +Cc: 18451

 > I sometimes see the same problem when
 > coming out of full-screen mode (see attached).

Does that problem occur with `frame-resize-pixelwise' non-nil?  In any
case please post the output of `(window--dump-frame)' for that frame
here.  It should be in the buffer *window-dump-frame*.

Thanks, martin





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

* bug#18451: 24.4.50; 'toggle-frame-fullscreen' can cut off minibuffer
  2014-09-19 10:22                             ` Matthew Leach
  2014-09-19 11:24                               ` martin rudalics
@ 2014-09-20  7:18                               ` Jan Djärv
  1 sibling, 0 replies; 21+ messages in thread
From: Jan Djärv @ 2014-09-20  7:18 UTC (permalink / raw)
  To: Matthew Leach; +Cc: 18451

Hello.

19 sep 2014 kl. 12:22 skrev Matthew Leach <matthew@mattleach.net>:

> 
> That sounds like a good idea, but I sometimes see the same problem when
> coming out of full-screen mode (see attached).  We'd need to disable
> hints for enabling and disabling full-screen, would that work?

Not really.  Fullscreen can be initated and terminated outside Emacs (title bar buttons, keyboard keys, etc) so Emacs would have no time turning hints off.  Forget this idea, it was not wel thought out.

	Jan D.







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

* bug#18451: 24.4.50; 'toggle-frame-fullscreen' can cut off minibuffer
  2014-09-18 12:01                       ` Matthew Leach
  2014-09-18 12:41                         ` martin rudalics
@ 2015-01-04 18:09                         ` martin rudalics
  2015-02-13 18:24                           ` martin rudalics
  1 sibling, 1 reply; 21+ messages in thread
From: martin rudalics @ 2015-01-04 18:09 UTC (permalink / raw)
  To: Matthew Leach; +Cc: 18451

 > Actually, I hadn't done that, I just evaluated it in the scratch buffer.
 > However, when I paste this as the first form in my .emacs it seems to
 > fix the issue! I've been toggling for about 10 minutes now and haven't
 > seen an occurrence of the bug.

I have added a remark about this to the doc-string of
`toggle-frame-fullscreen'.  Can we close this bug?

martin





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

* bug#18451: 24.4.50; 'toggle-frame-fullscreen' can cut off minibuffer
  2015-01-04 18:09                         ` martin rudalics
@ 2015-02-13 18:24                           ` martin rudalics
  0 siblings, 0 replies; 21+ messages in thread
From: martin rudalics @ 2015-02-13 18:24 UTC (permalink / raw)
  To: Matthew Leach; +Cc: 18451-done

> I have added a remark about this to the doc-string of
> `toggle-frame-fullscreen'.  Can we close this bug?

Closing this now.  If the issue reemerges we'll have to dig deeper.

martin





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

end of thread, other threads:[~2015-02-13 18:24 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-11 16:20 bug#18451: 24.4.50; 'toggle-frame-fullscreen' can cut off minibuffer dev
2014-09-11 17:33 ` Jan Djärv
2014-09-11 17:52   ` Matthew Leach
2014-09-13  9:55     ` Jan Djärv
2014-09-13 22:13       ` Matthew Leach
2014-09-14  9:20         ` Jan Djärv
2014-09-14 13:32           ` Matthew Leach
2014-09-16 18:38             ` Jan Djärv
2014-09-16 19:16               ` Matthew Leach
2014-09-17 10:02                 ` martin rudalics
2014-09-17 10:38                   ` Matthew Leach
2014-09-18  9:32                     ` martin rudalics
2014-09-18 12:01                       ` Matthew Leach
2014-09-18 12:41                         ` martin rudalics
2014-09-18 19:45                           ` Jan Djärv
2014-09-19 10:22                             ` Matthew Leach
2014-09-19 11:24                               ` martin rudalics
2014-09-20  7:18                               ` Jan Djärv
2015-01-04 18:09                         ` martin rudalics
2015-02-13 18:24                           ` martin rudalics
2014-09-17 16:05                 ` Jan Djärv

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).