summaryrefslogtreecommitdiff
path: root/src/w32term.c
diff options
context:
space:
mode:
authorMartin Rudalics <rudalics@gmx.at>2020-09-11 16:04:20 -0400
committerKen Brown <kbrown@cornell.edu>2020-09-12 07:32:58 -0400
commitb9db19b23a12c1c8c2160a0e86d487a71f026e6b (patch)
tree58057905d071691d0c70c49899f8c55ea2c03d0b /src/w32term.c
parent6a9c0b09687bf88eaacf22ba8a7837914298e7f8 (diff)
downloademacs-b9db19b23a12c1c8c2160a0e86d487a71f026e6b.tar.gz
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)
Diffstat (limited to 'src/w32term.c')
-rw-r--r--src/w32term.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/w32term.c b/src/w32term.c
index 1766b32514f..2669f29b560 100644
--- a/src/w32term.c
+++ b/src/w32term.c
@@ -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);
}
}