summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKacper Michajłow <kasper93@gmail.com>2023-10-02 20:10:28 +0200
committerDudemanguy <random342@airmail.cc>2023-10-02 21:51:47 +0000
commit01c5346d1ada7185710963628012a5c3dcf1ce74 (patch)
tree2de61db0a18735ca93a65e4d86953868b1d08612
parent47dec1c7c280cc36dbb402e1a13e95ddf619482e (diff)
downloadmpv-01c5346d1ada7185710963628012a5c3dcf1ce74.tar.bz2
mpv-01c5346d1ada7185710963628012a5c3dcf1ce74.tar.xz
win32: adjust WM_NCACTIVATE for better compatibility with window state
We have to support all changing states, not only borderless.
-rw-r--r--video/out/w32_common.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/video/out/w32_common.c b/video/out/w32_common.c
index 931a902c76..ecb33d2479 100644
--- a/video/out/w32_common.c
+++ b/video/out/w32_common.c
@@ -816,7 +816,7 @@ static DWORD update_style(struct vo_w32_state *w32, DWORD style)
{
const DWORD NO_FRAME = WS_OVERLAPPED | WS_MINIMIZEBOX | WS_THICKFRAME;
const DWORD FRAME = WS_OVERLAPPEDWINDOW;
- const DWORD FULLSCREEN = NO_FRAME;
+ const DWORD FULLSCREEN = NO_FRAME & ~WS_THICKFRAME;
style &= ~(NO_FRAME | FRAME | FULLSCREEN);
style |= WS_SYSMENU;
if (w32->current_fs) {
@@ -1287,7 +1287,9 @@ static LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam,
break;
case WM_NCACTIVATE:
// Cosmetic to remove blinking window border when initializing window
- return 1;
+ if (!w32->opts->border)
+ lParam = -1;
+ break;
case WM_NCHITTEST:
// Provide sizing handles for borderless windows
if ((!w32->opts->border || !w32->opts->title_bar) && !w32->current_fs) {