summaryrefslogtreecommitdiffstats
path: root/video
diff options
context:
space:
mode:
authorpavelxdd <pavel.otchertsov@gmail.com>2016-12-11 00:01:39 +0300
committerJames Ross-Gowan <rossymiles@gmail.com>2016-12-12 22:22:43 +1100
commitbf5727a60fbae12510238c23a38b89822b128baa (patch)
tree46efbc97a5472431cb1a564b28210a96831ce689 /video
parent765a7228d1815622ab0533cf2f1ffb3de04f24bc (diff)
downloadmpv-bf5727a60fbae12510238c23a38b89822b128baa.tar.bz2
mpv-bf5727a60fbae12510238c23a38b89822b128baa.tar.xz
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
Diffstat (limited to 'video')
-rw-r--r--video/out/w32_common.c13
1 files changed, 9 insertions, 4 deletions
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;
}