mirror of
https://github.com/mpv-player/mpv.git
synced 2026-10-25 20:49:49 +08:00
win32: set window_corners to default for fullscreen
I don't think in fullscreen mode it makes sense to enable rounded corners. We can add another option if someone needs it, but for now `window_corners` affects only the window as one would expect.
This commit is contained in:
committed by
Dudemanguy
parent
804eb80e78
commit
4defeddbfc
+10
-6
@@ -1043,6 +1043,15 @@ static void update_window_state(struct vo_w32_state *w32)
|
||||
signal_events(w32, VO_EVENT_RESIZE);
|
||||
}
|
||||
|
||||
static void update_corners_pref(const struct vo_w32_state *w32) {
|
||||
if (w32->parent)
|
||||
return;
|
||||
|
||||
int pref = w32->current_fs ? 0 : w32->opts->window_corners;
|
||||
DwmSetWindowAttribute(w32->window, DWMWA_WINDOW_CORNER_PREFERENCE,
|
||||
&pref, sizeof(pref));
|
||||
}
|
||||
|
||||
static void reinit_window_state(struct vo_w32_state *w32)
|
||||
{
|
||||
if (w32->parent)
|
||||
@@ -1050,6 +1059,7 @@ static void reinit_window_state(struct vo_w32_state *w32)
|
||||
|
||||
// The order matters: fs state should be updated prior to changing styles
|
||||
update_fullscreen_state(w32);
|
||||
update_corners_pref(w32);
|
||||
update_window_style(w32);
|
||||
|
||||
// fit_on_screen is applied at most once when/if applicable (normal win).
|
||||
@@ -1092,12 +1102,6 @@ static void update_dark_mode(const struct vo_w32_state *w32)
|
||||
&use_dark_mode, sizeof(use_dark_mode));
|
||||
}
|
||||
|
||||
static void update_corners_pref(const struct vo_w32_state *w32) {
|
||||
DwmSetWindowAttribute(w32->window, DWMWA_WINDOW_CORNER_PREFERENCE,
|
||||
&w32->opts->window_corners,
|
||||
sizeof(w32->opts->window_corners));
|
||||
}
|
||||
|
||||
static LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam,
|
||||
LPARAM lParam)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user