From c4386a8333c19e28005d7a47aa2a34c60e139912 Mon Sep 17 00:00:00 2001 From: reimar Date: Wed, 3 Dec 2008 10:38:50 +0000 Subject: Do not override the vo_dwidth/vo_dheight values in vo_w32_config in -wid mode because we ignore the requested size in that case. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28072 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libvo/w32_common.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'libvo/w32_common.c') diff --git a/libvo/w32_common.c b/libvo/w32_common.c index 9062f6898d..7674ba894b 100644 --- a/libvo/w32_common.c +++ b/libvo/w32_common.c @@ -380,10 +380,13 @@ int vo_w32_config(uint32_t width, uint32_t height, uint32_t flags) { o_dwidth = width; o_dheight = height; + if (WinID < 0) { + // the desired size is ignored in wid mode, it always matches the window size. prev_width = vo_dwidth = width; prev_height = vo_dheight = height; prev_x = vo_dx; prev_y = vo_dy; + } vo_fs = flags & VOFLAG_FULLSCREEN; vo_vm = flags & VOFLAG_MODESWITCHING; -- cgit v1.2.3 From 23a8967a4c43fbfc4ab7e20492b914857b1c600b Mon Sep 17 00:00:00 2001 From: reimar Date: Wed, 3 Dec 2008 10:42:53 +0000 Subject: Reindent after previous commit git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28073 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libvo/w32_common.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'libvo/w32_common.c') diff --git a/libvo/w32_common.c b/libvo/w32_common.c index 7674ba894b..29a756163f 100644 --- a/libvo/w32_common.c +++ b/libvo/w32_common.c @@ -381,11 +381,11 @@ int vo_w32_config(uint32_t width, uint32_t height, uint32_t flags) { o_dheight = height; if (WinID < 0) { - // the desired size is ignored in wid mode, it always matches the window size. - prev_width = vo_dwidth = width; - prev_height = vo_dheight = height; - prev_x = vo_dx; - prev_y = vo_dy; + // the desired size is ignored in wid mode, it always matches the window size. + prev_width = vo_dwidth = width; + prev_height = vo_dheight = height; + prev_x = vo_dx; + prev_y = vo_dy; } vo_fs = flags & VOFLAG_FULLSCREEN; -- cgit v1.2.3 From 70dbf549e601b922465eb513fead796403a351b0 Mon Sep 17 00:00:00 2001 From: reimar Date: Wed, 3 Dec 2008 10:54:01 +0000 Subject: More robust w32 -wid size handling git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28074 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libvo/w32_common.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'libvo/w32_common.c') diff --git a/libvo/w32_common.c b/libvo/w32_common.c index 29a756163f..3be776f5d9 100644 --- a/libvo/w32_common.c +++ b/libvo/w32_common.c @@ -175,6 +175,11 @@ int vo_w32_check_events(void) { } if (WinID >= 0) { RECT r; + GetClientRect(vo_window, &r); + if (r.right != vo_dwidth || r.bottom != vo_dheight) { + vo_dwidth = r.right; vo_dheight = r.bottom; + event_flags |= VO_EVENT_RESIZE; + } GetClientRect(WinID, &r); if (r.right != vo_dwidth || r.bottom != vo_dheight) MoveWindow(vo_window, 0, 0, r.right, r.bottom, FALSE); -- cgit v1.2.3