>> I just tried this on a Cygwin-w32 build from the master branch. I put the
taskbar on the left, started emacs, maximized it, attached gdb, put breakpoints
at each of the ShowWindow lines, and ran through Dani's recipe for producing the
bug. The breakpoints were never hit.
>
> I just tried again, but this time with a breakpoint at w32fullscreen_hook so
that I could follow the flow. Here are the relevant excerpts from the gdb session:
Thank you very much for checking.
> Breakpoint 2 at 0x10069507a: file ../../master/src/w32term.c, line 6441.
> (gdb) r -Q
> Starting program: /home/kbrown/src/emacs/x86_64-w32/src/emacs -Q
>
> [...]
>
> [Press F11]
>
> Thread 1 "emacs" hit Breakpoint 2, w32fullscreen_hook (f=0x8001f7c88)
> at ../../master/src/w32term.c:6441
[...]
> 6464 FRAME_PREV_FSMODE (f) = f->want_fullscreen;
> (gdb) p f->want_fullscreen
> $1 = FULLSCREEN_BOTH
While this is the expected value ...
> [...]
>
> (gdb) c
> Continuing.
>
> [Press F11 again]
>
> Thread 1 "emacs" hit Breakpoint 2, w32fullscreen_hook (f=0x8001f7c88)
> at ../../master/src/w32term.c:6441
[...]
> 6451 if (FRAME_PREV_FSMODE (f) == FULLSCREEN_NONE)
> (gdb) p f->want_fullscreen
> $2 = FULLSCREEN_NONE
... the value I would have expected here is FULLSCREEN_MAXIMIZED.
Something must have got broken before. Can you please
(1) Verify that the
f->want_fullscreen &= ~FULLSCREEN_WAIT;
does not interfere in any respect. That is, does f->want_fullscreen
have the same value FULLSCREEN_NONE before anding it with
FULLSCREEN_WAIT?