Fix toggle-frame-fullscreen on w32 builds

* src/w32term.c (w32_read_socket): Set 'fullscreen' to 'maximized'
if Windows sends SIZE_MAXIMIZED and either the top or the left of
the frame is outside the screen.  (Bug#25542)
This commit is contained in:
Martin Rudalics 2020-09-11 16:04:20 -04:00 committed by Ken Brown
parent 6a9c0b0968
commit b9db19b23a

View file

@ -5478,15 +5478,15 @@ w32_read_socket (struct terminal *terminal,
/* Windows can send us a SIZE_MAXIMIZED message even
when fullscreen is fullboth. The following is a
simple hack to check that based on the fact that
only a maximized fullscreen frame should have both
top/left outside the screen. */
only a maximized fullscreen frame should have top
or left outside the screen. */
if (EQ (fullscreen, Qfullwidth) || EQ (fullscreen, Qfullheight)
|| NILP (fullscreen))
{
int x, y;
w32_real_positions (f, &x, &y);
if (x < 0 && y < 0)
if (x < 0 || y < 0)
store_frame_param (f, Qfullscreen, Qmaximized);
}
}