From bf5727a60fbae12510238c23a38b89822b128baa Mon Sep 17 00:00:00 2001 From: pavelxdd Date: Sun, 11 Dec 2016 00:01:39 +0300 Subject: win32: window styles improvements Allow minimizing the borderless/fullscreen window by clicking on the taskbar button or pressing Win+Down hotkey. Also fixes #2229 and probably fixes #2451 --- video/out/w32_common.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'video') diff --git a/video/out/w32_common.c b/video/out/w32_common.c index 5149339b6a..5754a670de 100644 --- a/video/out/w32_common.c +++ b/video/out/w32_common.c @@ -1112,10 +1112,15 @@ static void update_screen_rect(struct vo_w32_state *w32) static DWORD update_style(struct vo_w32_state *w32, DWORD style) { - const DWORD NO_FRAME = WS_OVERLAPPED; - const DWORD FRAME = WS_OVERLAPPEDWINDOW | WS_SIZEBOX; - style &= ~(NO_FRAME | FRAME); - style |= (w32->opts->border && !w32->current_fs) ? FRAME : NO_FRAME; + const DWORD NO_FRAME = WS_OVERLAPPED | WS_MINIMIZEBOX; + const DWORD FRAME = WS_OVERLAPPEDWINDOW; + const DWORD FULLSCREEN = NO_FRAME | WS_SYSMENU; + style &= ~(NO_FRAME | FRAME | FULLSCREEN); + if (w32->current_fs) { + style |= FULLSCREEN; + } else { + style |= w32->opts->border ? FRAME : NO_FRAME; + } return style; } -- cgit v1.2.3