From 4af24daf2c4d98f775c5a40d08878d6a2e974503 Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 28 Nov 2014 22:11:54 +0100 Subject: win32: add screen offset when handling overlarge windows MS Windows doesn't allow windows larger than the screen, so we include a hack to make the window smaller. This hack recenters the window (what else would it do?). It didn't account for the virtual offset of the current screen, and it was reported that it forces the window to the first screen. Should fix #1292. --- video/out/w32_common.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'video') diff --git a/video/out/w32_common.c b/video/out/w32_common.c index f2d02d2c84..9f0180b49e 100644 --- a/video/out/w32_common.c +++ b/video/out/w32_common.c @@ -904,8 +904,8 @@ static int reinit_window_state(struct vo_w32_state *w32) // Center the final window n_w = r.right - r.left; n_h = r.bottom - r.top; - r.left = screen_w / 2 - n_w / 2; - r.top = screen_h / 2 - n_h / 2; + r.left = w32->screenrc.x0 + screen_w / 2 - n_w / 2; + r.top = w32->screenrc.y0 + screen_h / 2 - n_h / 2; r.right = r.left + n_w; r.bottom = r.top + n_h; } -- cgit v1.2.3