winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
November 2021
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
2 participants
951 discussions
Start a n
N
ew thread
Zhiyi Zhang : comctl32/button: Correctly place parts for themed split buttons.
by Alexandre Julliard
05 Nov '21
05 Nov '21
Module: wine Branch: master Commit: 595f5c59ec6f72c935eddf6ae5dc3b3b2314edf0 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=595f5c59ec6f72c935eddf6a…
Author: Zhiyi Zhang <zzhang(a)codeweavers.com> Date: Fri Nov 5 14:35:05 2021 +0800 comctl32/button: Correctly place parts for themed split buttons. Signed-off-by: Zhiyi Zhang <zzhang(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/comctl32/button.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/dlls/comctl32/button.c b/dlls/comctl32/button.c index 7b617a199b0..19febd8b6ac 100644 --- a/dlls/comctl32/button.c +++ b/dlls/comctl32/button.c @@ -2917,7 +2917,7 @@ static void GB_ThemedPaint(HTHEME theme, const BUTTON_INFO *infoPtr, HDC hDC, in static void SB_ThemedPaint(HTHEME theme, const BUTTON_INFO *infoPtr, HDC hDC, int state, UINT dtFlags, BOOL focused) { - RECT rc, content_rect, push_rect, dropdown_rect, focus_rect; + RECT rc, content_rect, push_rect, dropdown_rect, focus_rect, label_rect, image_rect, text_rect; NMCUSTOMDRAW nmcd; LRESULT cdrf; HWND parent; @@ -2984,13 +2984,12 @@ static void SB_ThemedPaint(HTHEME theme, const BUTTON_INFO *infoPtr, HDC hDC, in { COLORREF old_color, color; INT old_bk_mode; - WCHAR *text; - if ((text = get_button_text(infoPtr))) - { - DrawThemeText(theme, hDC, BP_PUSHBUTTON, state, text, lstrlenW(text), dtFlags, 0, &content_rect); - heap_free(text); - } + label_rect = content_rect; + dtFlags = BUTTON_CalcLayoutRects(infoPtr, hDC, &label_rect, &image_rect, &text_rect); + if (dtFlags != (UINT)-1L) + BUTTON_DrawThemedLabel(infoPtr, hDC, dtFlags, &image_rect, &text_rect, theme, + BP_PUSHBUTTON, state); GetThemeColor(theme, BP_PUSHBUTTON, state, TMT_TEXTCOLOR, &color); old_bk_mode = SetBkMode(hDC, TRANSPARENT);
1
0
0
0
Zhiyi Zhang : comctl32/button: Correctly place parts for themed group boxes.
by Alexandre Julliard
05 Nov '21
05 Nov '21
Module: wine Branch: master Commit: 7c9cacd47f969181624b2c5fafd7554188d7fa47 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=7c9cacd47f969181624b2c5f…
Author: Zhiyi Zhang <zzhang(a)codeweavers.com> Date: Fri Nov 5 14:34:58 2021 +0800 comctl32/button: Correctly place parts for themed group boxes. Signed-off-by: Zhiyi Zhang <zzhang(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/comctl32/button.c | 49 +++++++++++++++++++++++++++---------------------- 1 file changed, 27 insertions(+), 22 deletions(-) diff --git a/dlls/comctl32/button.c b/dlls/comctl32/button.c index 515dff03921..7b617a199b0 100644 --- a/dlls/comctl32/button.c +++ b/dlls/comctl32/button.c @@ -2855,11 +2855,12 @@ cleanup: static void GB_ThemedPaint(HTHEME theme, const BUTTON_INFO *infoPtr, HDC hDC, int state, UINT dtFlags, BOOL focused) { - RECT bgRect, textRect, contentRect; - WCHAR *text = get_button_text(infoPtr); + RECT clientRect, contentRect, imageRect, textRect, bgRect; + HRGN region, textRegion = NULL; LOGFONTW lf; HFONT font, hPrevFont = NULL; BOOL created_font = FALSE; + TEXTMETRICW textMetric; HRESULT hr = GetThemeFont(theme, hDC, BP_GROUPBOX, state, TMT_FONT, &lf); if (SUCCEEDED(hr)) { @@ -2875,37 +2876,41 @@ static void GB_ThemedPaint(HTHEME theme, const BUTTON_INFO *infoPtr, HDC hDC, in SelectObject(hDC, infoPtr->font); } - GetClientRect(infoPtr->hwnd, &bgRect); - textRect = bgRect; + GetClientRect(infoPtr->hwnd, &clientRect); + GetThemeBackgroundContentRect(theme, hDC, BP_GROUPBOX, state, &clientRect, &contentRect); + region = set_control_clipping(hDC, &clientRect); - if (text) - { - SIZE textExtent; - GetTextExtentPoint32W(hDC, text, lstrlenW(text), &textExtent); - bgRect.top += (textExtent.cy / 2); - textRect.left += 10; - textRect.bottom = textRect.top + textExtent.cy; - textRect.right = textRect.left + textExtent.cx + 4; + bgRect = contentRect; + GetTextMetricsW(hDC, &textMetric); + bgRect.top += (textMetric.tmHeight / 2) - 1; - ExcludeClipRect(hDC, textRect.left, textRect.top, textRect.right, textRect.bottom); + InflateRect(&contentRect, -7, 1); + dtFlags = BUTTON_CalcLayoutRects(infoPtr, hDC, &contentRect, &imageRect, &textRect); + if (dtFlags != (UINT)-1 && !show_image_only(infoPtr)) + { + textRegion = CreateRectRgnIndirect(&textRect); + ExtSelectClipRgn(hDC, textRegion, RGN_DIFF); } - GetThemeBackgroundContentRect(theme, hDC, BP_GROUPBOX, state, &bgRect, &contentRect); - ExcludeClipRect(hDC, contentRect.left, contentRect.top, contentRect.right, contentRect.bottom); - if (IsThemeBackgroundPartiallyTransparent(theme, BP_GROUPBOX, state)) DrawThemeParentBackground(infoPtr->hwnd, hDC, NULL); DrawThemeBackground(theme, hDC, BP_GROUPBOX, state, &bgRect, NULL); - SelectClipRgn(hDC, NULL); - - if (text) + if (dtFlags != (UINT)-1) { - InflateRect(&textRect, -2, 0); - DrawThemeText(theme, hDC, BP_GROUPBOX, state, text, lstrlenW(text), 0, 0, &textRect); - heap_free(text); + contentRect.left--; + contentRect.right++; + contentRect.bottom++; + if (textRegion) + { + SelectClipRgn(hDC, textRegion); + DeleteObject(textRegion); + } + BUTTON_DrawThemedLabel(infoPtr, hDC, dtFlags, &imageRect, &textRect, theme, BP_GROUPBOX, state); } + SelectClipRgn(hDC, region); + if (region) DeleteObject(region); if (created_font) DeleteObject(font); if (hPrevFont) SelectObject(hDC, hPrevFont); }
1
0
0
0
Zhiyi Zhang : comctl32/button: Correctly place parts for themed check boxes.
by Alexandre Julliard
05 Nov '21
05 Nov '21
Module: wine Branch: master Commit: 4f912012a97c3e7e5ba47f3f123c1a79be2fb82e URL:
https://source.winehq.org/git/wine.git/?a=commit;h=4f912012a97c3e7e5ba47f3f…
Author: Zhiyi Zhang <zzhang(a)codeweavers.com> Date: Fri Nov 5 14:34:46 2021 +0800 comctl32/button: Correctly place parts for themed check boxes. Signed-off-by: Zhiyi Zhang <zzhang(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/comctl32/button.c | 76 ++++++++++++++++++++++++++++---------------------- 1 file changed, 42 insertions(+), 34 deletions(-) diff --git a/dlls/comctl32/button.c b/dlls/comctl32/button.c index 80635feaafc..515dff03921 100644 --- a/dlls/comctl32/button.c +++ b/dlls/comctl32/button.c @@ -2748,18 +2748,20 @@ static void PB_ThemedPaint(HTHEME theme, const BUTTON_INFO *infoPtr, HDC hDC, in static void CB_ThemedPaint(HTHEME theme, const BUTTON_INFO *infoPtr, HDC hDC, int state, UINT dtFlags, BOOL focused) { - SIZE sz; - RECT bgRect, textRect; + RECT client_rect, content_rect, old_label_rect, label_rect, box_rect, image_rect, text_rect; HFONT font, hPrevFont = NULL; DWORD dwStyle = GetWindowLongW(infoPtr->hwnd, GWL_STYLE); + LONG ex_style = GetWindowLongW(infoPtr->hwnd, GWL_EXSTYLE); UINT btn_type = get_button_type( dwStyle ); int part = (btn_type == BS_RADIOBUTTON) || (btn_type == BS_AUTORADIOBUTTON) ? BP_RADIOBUTTON : BP_CHECKBOX; NMCUSTOMDRAW nmcd; LRESULT cdrf; LOGFONTW lf; HWND parent; - WCHAR *text; BOOL created_font = FALSE; + int text_offset; + SIZE box_size; + HRGN region; HRESULT hr = GetThemeFont(theme, hDC, part, state, TMT_FONT, &lf); if (SUCCEEDED(hr)) { @@ -2775,20 +2777,31 @@ static void CB_ThemedPaint(HTHEME theme, const BUTTON_INFO *infoPtr, HDC hDC, in if (infoPtr->font) SelectObject(hDC, infoPtr->font); } - if (FAILED(GetThemePartSize(theme, hDC, part, state, NULL, TS_DRAW, &sz))) - sz.cx = sz.cy = 13; + GetClientRect(infoPtr->hwnd, &client_rect); + GetThemeBackgroundContentRect(theme, hDC, part, state, &client_rect, &content_rect); + region = set_control_clipping(hDC, &client_rect); - GetClientRect(infoPtr->hwnd, &bgRect); - GetThemeBackgroundContentRect(theme, hDC, part, state, &bgRect, &textRect); - init_custom_draw(&nmcd, infoPtr, hDC, &bgRect); + if (FAILED(GetThemePartSize(theme, hDC, part, state, NULL, TS_DRAW, &box_size))) + { + box_size.cx = 12 * GetDpiForWindow(infoPtr->hwnd) / 96 + 1; + box_size.cy = box_size.cx; + } - if (dtFlags & DT_SINGLELINE) /* Center the checkbox / radio button to the text. */ - bgRect.top = bgRect.top + (textRect.bottom - textRect.top - sz.cy) / 2; + GetCharWidthW(hDC, '0', '0', &text_offset); + text_offset /= 2; + + label_rect = content_rect; + if (dwStyle & BS_LEFTTEXT || ex_style & WS_EX_RIGHT) + label_rect.right -= box_size.cx + text_offset; + else + label_rect.left += box_size.cx + text_offset; + + old_label_rect = label_rect; + dtFlags = BUTTON_CalcLayoutRects(infoPtr, hDC, &label_rect, &image_rect, &text_rect); + box_rect = get_box_rect(dwStyle, ex_style, &content_rect, &label_rect, dtFlags != (UINT)-1L, + box_size); - /* adjust for the check/radio marker */ - bgRect.bottom = bgRect.top + sz.cy; - bgRect.right = bgRect.left + sz.cx; - textRect.left = bgRect.right + 6; + init_custom_draw(&nmcd, infoPtr, hDC, &client_rect); parent = GetParent(infoPtr->hwnd); if (!parent) parent = infoPtr->hwnd; @@ -2798,7 +2811,6 @@ static void CB_ThemedPaint(HTHEME theme, const BUTTON_INFO *infoPtr, HDC hDC, in if (cdrf & CDRF_SKIPDEFAULT) goto cleanup; DrawThemeParentBackground(infoPtr->hwnd, hDC, NULL); - DrawThemeBackground(theme, hDC, part, state, &bgRect, NULL); if (cdrf & CDRF_NOTIFYPOSTERASE) { @@ -2811,36 +2823,32 @@ static void CB_ThemedPaint(HTHEME theme, const BUTTON_INFO *infoPtr, HDC hDC, in cdrf = SendMessageW(parent, WM_NOTIFY, nmcd.hdr.idFrom, (LPARAM)&nmcd); if (cdrf & CDRF_SKIPDEFAULT) goto cleanup; - text = get_button_text(infoPtr); - if (!(cdrf & CDRF_DOERASE) && text) - DrawThemeText(theme, hDC, part, state, text, lstrlenW(text), dtFlags, 0, &textRect); + /* Draw label */ + if (!(cdrf & CDRF_DOERASE)) + { + DrawThemeBackground(theme, hDC, part, state, &box_rect, NULL); + if (dtFlags != (UINT)-1L) + BUTTON_DrawThemedLabel(infoPtr, hDC, dtFlags, &image_rect, &text_rect, theme, part, state); + } if (cdrf & CDRF_NOTIFYPOSTPAINT) { nmcd.dwDrawStage = CDDS_POSTPAINT; SendMessageW(parent, WM_NOTIFY, nmcd.hdr.idFrom, (LPARAM)&nmcd); } + if ((cdrf & CDRF_SKIPPOSTPAINT) || dtFlags == (UINT)-1L) goto cleanup; - if (text) + if (focused) { - if (!(cdrf & CDRF_SKIPPOSTPAINT) && focused) - { - RECT focusRect; - - focusRect = textRect; - - DrawTextW(hDC, text, lstrlenW(text), &focusRect, dtFlags | DT_CALCRECT); - - if (focusRect.right < textRect.right) focusRect.right++; - focusRect.bottom = textRect.bottom; - - DrawFocusRect( hDC, &focusRect ); - } - - heap_free(text); + label_rect.left--; + label_rect.right++; + IntersectRect(&label_rect, &label_rect, &old_label_rect); + DrawFocusRect(hDC, &label_rect); } cleanup: + SelectClipRgn(hDC, region); + if (region) DeleteObject(region); if (created_font) DeleteObject(font); if (hPrevFont) SelectObject(hDC, hPrevFont); }
1
0
0
0
Zhiyi Zhang : comctl32/button: Correctly place parts for themed push buttons.
by Alexandre Julliard
05 Nov '21
05 Nov '21
Module: wine Branch: master Commit: e1fb7f8b86af799c6074f880ddcf68cb5f2ca778 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=e1fb7f8b86af799c6074f880…
Author: Zhiyi Zhang <zzhang(a)codeweavers.com> Date: Fri Nov 5 14:34:37 2021 +0800 comctl32/button: Correctly place parts for themed push buttons. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=51916
Signed-off-by: Zhiyi Zhang <zzhang(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/comctl32/button.c | 47 ++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 40 insertions(+), 7 deletions(-) diff --git a/dlls/comctl32/button.c b/dlls/comctl32/button.c index 70ac6b1c2da..80635feaafc 100644 --- a/dlls/comctl32/button.c +++ b/dlls/comctl32/button.c @@ -1761,6 +1761,38 @@ static void BUTTON_DrawLabel(const BUTTON_INFO *infoPtr, HDC hdc, UINT dtFlags, heap_free(text); } +static void BUTTON_DrawThemedLabel(const BUTTON_INFO *info, HDC hdc, UINT text_flags, + const RECT *image_rect, const RECT *text_rect, HTHEME theme, + int part, int state) +{ + HBRUSH brush = NULL; + UINT image_flags; + WCHAR *text; + + if (show_image(info)) + { + image_flags = IsWindowEnabled(info->hwnd) ? DSS_NORMAL : DSS_DISABLED; + + if ((GetWindowLongW(info->hwnd, GWL_STYLE) & BS_PUSHLIKE) + && (info->state & BST_INDETERMINATE)) + { + brush = GetSysColorBrush(COLOR_GRAYTEXT); + image_flags |= DSS_MONO; + } + + BUTTON_DrawImage(info, hdc, brush, image_flags, image_rect); + } + + if (show_image_only(info)) + return; + + if (!(text = get_button_text(info))) + return; + + DrawThemeText(theme, hdc, part, state, text, lstrlenW(text), text_flags, 0, text_rect); + heap_free(text); +} + /********************************************************************** * Push Button Functions */ @@ -2661,17 +2693,16 @@ cleanup: */ static void PB_ThemedPaint(HTHEME theme, const BUTTON_INFO *infoPtr, HDC hDC, int state, UINT dtFlags, BOOL focused) { - RECT bgRect, textRect, focusRect; + RECT bgRect, labelRect, imageRect, textRect, focusRect; NMCUSTOMDRAW nmcd; LRESULT cdrf; HWND parent; - WCHAR *text; if (infoPtr->font) SelectObject(hDC, infoPtr->font); GetClientRect(infoPtr->hwnd, &bgRect); - GetThemeBackgroundContentRect(theme, hDC, BP_PUSHBUTTON, state, &bgRect, &textRect); - focusRect = textRect; + GetThemeBackgroundContentRect(theme, hDC, BP_PUSHBUTTON, state, &bgRect, &labelRect); + focusRect = labelRect; init_custom_draw(&nmcd, infoPtr, hDC, &bgRect); @@ -2697,10 +2728,12 @@ static void PB_ThemedPaint(HTHEME theme, const BUTTON_INFO *infoPtr, HDC hDC, in cdrf = SendMessageW(parent, WM_NOTIFY, nmcd.hdr.idFrom, (LPARAM)&nmcd); if (cdrf & CDRF_SKIPDEFAULT) return; - if (!(cdrf & CDRF_DOERASE) && (text = get_button_text(infoPtr))) + if (!(cdrf & CDRF_DOERASE)) { - DrawThemeText(theme, hDC, BP_PUSHBUTTON, state, text, lstrlenW(text), dtFlags, 0, &textRect); - heap_free(text); + dtFlags = BUTTON_CalcLayoutRects(infoPtr, hDC, &labelRect, &imageRect, &textRect); + if (dtFlags != (UINT)-1L) + BUTTON_DrawThemedLabel(infoPtr, hDC, dtFlags, &imageRect, &textRect, theme, + BP_PUSHBUTTON, state); } if (cdrf & CDRF_NOTIFYPOSTPAINT)
1
0
0
0
Zhiyi Zhang : comctl32/button: Correctly place parts for buttons with WS_EX_RIGHT.
by Alexandre Julliard
05 Nov '21
05 Nov '21
Module: wine Branch: master Commit: 2f2cfaf076968ed7a6250b8a61c433e5722e0b55 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=2f2cfaf076968ed7a6250b8a…
Author: Zhiyi Zhang <zzhang(a)codeweavers.com> Date: Fri Nov 5 14:34:30 2021 +0800 comctl32/button: Correctly place parts for buttons with WS_EX_RIGHT. WS_EX_RIGHT has the same effect as BS_RIGHT. Signed-off-by: Zhiyi Zhang <zzhang(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/comctl32/button.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/dlls/comctl32/button.c b/dlls/comctl32/button.c index 6a463cb3460..70ac6b1c2da 100644 --- a/dlls/comctl32/button.c +++ b/dlls/comctl32/button.c @@ -1547,17 +1547,15 @@ static BOOL CL_GetIdealSize(BUTTON_INFO *infoPtr, SIZE *size) */ static UINT BUTTON_CalcLayoutRects(const BUTTON_INFO *infoPtr, HDC hdc, RECT *labelRc, RECT *imageRc, RECT *textRc) { - LONG style = GetWindowLongW( infoPtr->hwnd, GWL_STYLE ); - LONG ex_style = GetWindowLongW( infoPtr->hwnd, GWL_EXSTYLE ); - LONG split_style = infoPtr->imagelist.himl ? BUTTON_ILStoBS(infoPtr->imagelist.uAlign) : style; WCHAR *text = get_button_text(infoPtr); SIZE imageSize = BUTTON_GetImageSize(infoPtr); - UINT dtStyle = BUTTON_BStoDT(style, ex_style); RECT labelRect, imageRect, imageRectWithMargin, textRect; LONG imageMarginWidth, imageMarginHeight; const RECT *textMargin = BUTTON_GetTextMargin(infoPtr); + LONG style, ex_style, split_style; RECT emptyMargin = {0}; LONG maxTextWidth; + UINT dtStyle; /* Calculate label rectangle according to label type */ if ((imageSize.cx == 0 && imageSize.cy == 0) && (text == NULL || text[0] == '\0')) @@ -1569,6 +1567,14 @@ static UINT BUTTON_CalcLayoutRects(const BUTTON_INFO *infoPtr, HDC hdc, RECT *la return (UINT)-1; } + style = GetWindowLongW(infoPtr->hwnd, GWL_STYLE); + ex_style = GetWindowLongW(infoPtr->hwnd, GWL_EXSTYLE); + /* Add BS_RIGHT directly. When both WS_EX_RIGHT and BS_LEFT are present, it becomes BS_CENTER */ + if (ex_style & WS_EX_RIGHT) + style |= BS_RIGHT; + split_style = infoPtr->imagelist.himl ? BUTTON_ILStoBS(infoPtr->imagelist.uAlign) : style; + dtStyle = BUTTON_BStoDT(style, ex_style); + SetRect(&imageRect, 0, 0, imageSize.cx, imageSize.cy); imageRectWithMargin = imageRect; if (infoPtr->imagelist.himl)
1
0
0
0
Alistair Leslie-Hughes : msdasql: Implement IDBProperties GetProperties.
by Alexandre Julliard
05 Nov '21
05 Nov '21
Module: wine Branch: master Commit: 6e94e879947d9328aa3fbe8a7861bc2d5a464948 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=6e94e879947d9328aa3fbe8a…
Author: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> Date: Fri Nov 5 16:29:59 2021 +1100 msdasql: Implement IDBProperties GetProperties. Signed-off-by: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/msdasql/msdasql_main.c | 76 +++++++++++++++++++++++++++++++++++++++++-- dlls/msdasql/tests/provider.c | 57 ++++++++++++++++++++++++++++++-- dlls/oledb32/tests/database.c | 4 +-- 3 files changed, 130 insertions(+), 7 deletions(-) diff --git a/dlls/msdasql/msdasql_main.c b/dlls/msdasql/msdasql_main.c index b8d68287e6a..d14f7957978 100644 --- a/dlls/msdasql/msdasql_main.c +++ b/dlls/msdasql/msdasql_main.c @@ -193,6 +193,12 @@ static const struct dbproperty dbproperties[] = { L"General Timeout", DBPROP_INIT_GENERALTIMEOUT, DBPROPOPTIONS_OPTIONAL, VT_I4 }, }; +struct msdasql_prop +{ + VARTYPE id; + VARIANT value; +}; + struct msdasql { IUnknown MSDASQL_iface; @@ -202,6 +208,7 @@ struct msdasql IPersist IPersist_iface; LONG ref; + struct msdasql_prop properties[14]; }; static inline struct msdasql *impl_from_IUnknown(IUnknown *iface) @@ -324,10 +331,49 @@ static HRESULT WINAPI dbprops_GetProperties(IDBProperties *iface, ULONG cPropert const DBPROPIDSET rgPropertyIDSets[], ULONG *pcPropertySets, DBPROPSET **prgPropertySets) { struct msdasql *provider = impl_from_IDBProperties(iface); + int i, j, k; + DBPROPSET *propset; - FIXME("(%p)->(%d %p %p %p)\n", provider, cPropertyIDSets, rgPropertyIDSets, pcPropertySets, prgPropertySets); + TRACE("(%p)->(%d %p %p %p)\n", provider, cPropertyIDSets, rgPropertyIDSets, pcPropertySets, prgPropertySets); - return E_NOTIMPL; + *pcPropertySets = 1; + + if (cPropertyIDSets != 1) + { + FIXME("Currently only 1 property set supported.\n"); + cPropertyIDSets = 1; + } + + propset = CoTaskMemAlloc(cPropertyIDSets * sizeof(DBPROPSET)); + propset->guidPropertySet = DBPROPSET_DBINIT; + + for (i=0; i < cPropertyIDSets; i++) + { + TRACE("Property id %d (count %d, set %s)\n", i, rgPropertyIDSets[i].cPropertyIDs, + debugstr_guid(&rgPropertyIDSets[i].guidPropertySet)); + + propset->cProperties = rgPropertyIDSets[i].cPropertyIDs; + propset->rgProperties = CoTaskMemAlloc(propset->cProperties * sizeof(DBPROP)); + + for (j=0; j < propset->cProperties; j++) + { + propset->rgProperties[j].dwPropertyID = rgPropertyIDSets[i].rgPropertyIDs[j]; + + for(k = 0; k < ARRAY_SIZE(provider->properties); k++) + { + if (provider->properties[k].id == rgPropertyIDSets[i].rgPropertyIDs[j]) + { + V_VT(&propset->rgProperties[j].vValue) = VT_EMPTY; + VariantCopy(&propset->rgProperties[j].vValue, &provider->properties[k].value); + break; + } + } + } + } + + *prgPropertySets = propset; + + return S_OK; } static HRESULT WINAPI dbprops_GetPropertyInfo(IDBProperties *iface, ULONG cPropertyIDSets, @@ -531,6 +577,7 @@ static HRESULT create_msdasql_provider(REFIID riid, void **ppv) { struct msdasql *provider; HRESULT hr; + int i; provider = malloc(sizeof(struct msdasql)); if (!provider) @@ -543,6 +590,31 @@ static HRESULT create_msdasql_provider(REFIID riid, void **ppv) provider->IPersist_iface.lpVtbl = &persistVtbl; provider->ref = 1; + for(i=0; i < ARRAY_SIZE(dbproperties); i++) + { + provider->properties[i].id = dbproperties[i].id; + VariantInit(&provider->properties[i].value); + + /* Only the follow are initialized to a value */ + switch(dbproperties[i].id) + { + case DBPROP_INIT_PROMPT: + V_VT(&provider->properties[i].value) = dbproperties[i].type; + V_I2(&provider->properties[i].value) = 4; + break; + case DBPROP_INIT_LCID: + V_VT(&provider->properties[i].value) = dbproperties[i].type; + V_I4(&provider->properties[i].value) = GetUserDefaultLCID(); + break; + case DBPROP_INIT_OLEDBSERVICES: + V_VT(&provider->properties[i].value) = dbproperties[i].type; + V_I4(&provider->properties[i].value) = -1; + break; + default: + V_VT(&provider->properties[i].value) = VT_EMPTY; + } + } + hr = IUnknown_QueryInterface(&provider->MSDASQL_iface, riid, ppv); IUnknown_Release(&provider->MSDASQL_iface); return hr; diff --git a/dlls/msdasql/tests/provider.c b/dlls/msdasql/tests/provider.c index 6cf95e02a80..6ffe17e7028 100644 --- a/dlls/msdasql/tests/provider.c +++ b/dlls/msdasql/tests/provider.c @@ -75,6 +75,14 @@ static void test_Properties(void) ULONG infocount; DBPROPINFOSET *propinfoset; WCHAR *desc; + DBPROPID properties[14] = + { + DBPROP_AUTH_PASSWORD, DBPROP_AUTH_PERSIST_SENSITIVE_AUTHINFO, DBPROP_AUTH_USERID, + DBPROP_INIT_DATASOURCE, DBPROP_INIT_HWND, DBPROP_INIT_LOCATION, + DBPROP_INIT_MODE, DBPROP_INIT_PROMPT, DBPROP_INIT_TIMEOUT, + DBPROP_INIT_PROVIDERSTRING, DBPROP_INIT_LCID, DBPROP_INIT_CATALOG, + DBPROP_INIT_OLEDBSERVICES, DBPROP_INIT_GENERALTIMEOUT + }; hr = CoCreateInstance( &CLSID_MSDASQL, NULL, CLSCTX_ALL, &IID_IDBProperties, (void **)&props); ok(hr == S_OK, "Failed to create object 0x%08x\n", hr); @@ -88,18 +96,30 @@ static void test_Properties(void) ok(hr == S_OK, "got 0x%08x\n", hr); if (hr == S_OK) { - ULONG i; VARTYPE types[14] = { VT_BSTR, VT_BOOL, VT_BSTR, VT_BSTR, intptr_vartype, VT_BSTR, VT_I4, VT_I2 , VT_I4, VT_BSTR, VT_I4, VT_BSTR, VT_I4, VT_I4 }; + ULONG i; + DBPROPIDSET propidlist; + ULONG propcnt; + DBPROPSET *propset; ok(IsEqualGUID(&propinfoset->guidPropertySet, &DBPROPSET_DBINIT), "got %s\n", debugstr_guid(&propinfoset->guidPropertySet)); ok(propinfoset->cPropertyInfos == 14, "got %d\n", propinfoset->cPropertyInfos); + propidlist.guidPropertySet = DBPROPSET_DBINIT; + propidlist.cPropertyIDs = propinfoset->cPropertyInfos; + propidlist.rgPropertyIDs = CoTaskMemAlloc(propinfoset->cPropertyInfos * sizeof(DBPROP)); + for (i = 0; i < propinfoset->cPropertyInfos; i++) { - trace("%d: pwszDescription: %s\n", i, debugstr_w(propinfoset->rgPropertyInfos[i].pwszDescription) ); ok(propinfoset->rgPropertyInfos[i].vtType == types[i], "got %d\n", propinfoset->rgPropertyInfos[i].vtType); ok(propinfoset->rgPropertyInfos[i].dwFlags == (DBPROPFLAGS_DBINIT | DBPROPFLAGS_READ | DBPROPFLAGS_WRITE), "got %d\n", propinfoset->rgPropertyInfos[i].dwFlags); + ok(properties[i] == propinfoset->rgPropertyInfos[i].dwPropertyID, "%d, got %d\n", i, + propinfoset->rgPropertyInfos[i].dwPropertyID); + ok(propinfoset->rgPropertyInfos[i].vtType != VT_EMPTY, "%d, got %d\n", i, + propinfoset->rgPropertyInfos[i].vtType); + + propidlist.rgPropertyIDs[i] = propinfoset->rgPropertyInfos[i].dwPropertyID; } for (i = 0; i < propinfoset->cPropertyInfos; i++) @@ -107,6 +127,39 @@ static void test_Properties(void) CoTaskMemFree(propinfoset->rgPropertyInfos); CoTaskMemFree(propinfoset); + + hr = IDBProperties_GetProperties(props, 1, &propidlist, &propcnt, &propset); + ok(hr == S_OK, "got 0x%08x\n", hr); + ok(propidlist.cPropertyIDs == 14, "got %d\n", propinfoset->cPropertyInfos); + ok(propset->cProperties == 14, "got %d\n", propinfoset->cPropertyInfos); + + for (i = 0; i < propidlist.cPropertyIDs; i++) + { + VARTYPE vartype = VT_EMPTY; + + ok(properties[i] == propidlist.rgPropertyIDs[i], "%d, got %d\n", i, propidlist.rgPropertyIDs[i]); + + if(properties[i] == DBPROP_INIT_PROMPT) + { + ok(V_I2(&propset->rgProperties[i].vValue) == 4, "wrong value %s\n", debugstr_variant(&propset->rgProperties[i].vValue)); + vartype = VT_I2; + } + else if(properties[i] == DBPROP_INIT_LCID) + { + ok(V_I4(&propset->rgProperties[i].vValue) == GetUserDefaultLCID(), "wrong value %s\n", debugstr_variant(&propset->rgProperties[i].vValue)); + vartype = VT_I4; + } + else if(properties[i] == DBPROP_INIT_OLEDBSERVICES) + { + ok(V_I4(&propset->rgProperties[i].vValue) == -1, "wrong value %s\n", debugstr_variant(&propset->rgProperties[i].vValue)); + vartype = VT_I4; + } + + ok(V_VT(&propset->rgProperties[i].vValue) == vartype, "%d wrong type %d\n", i, V_VT(&propset->rgProperties[i].vValue)); + } + + CoTaskMemFree(propidlist.rgPropertyIDs); + CoTaskMemFree(propset); } IDBProperties_Release(props); diff --git a/dlls/oledb32/tests/database.c b/dlls/oledb32/tests/database.c index 421f4258afd..8bdb1f948f4 100644 --- a/dlls/oledb32/tests/database.c +++ b/dlls/oledb32/tests/database.c @@ -1039,8 +1039,7 @@ static void test_odbc_provider(void) CoTaskMemFree(propinfoset); hr = IDBProperties_GetProperties(props, 1, &propidlist, &propcnt, &propset); - todo_wine ok(hr == S_OK, "got 0x%08x\n", hr); - if (hr == S_OK) { /* Remove if, once _GetProperties is implemented */ + ok(hr == S_OK, "got 0x%08x\n", hr); ok(propidlist.cPropertyIDs == 14, "got %d\n", propinfoset->cPropertyInfos); for (i = 0; i < propidlist.cPropertyIDs; i++) @@ -1050,7 +1049,6 @@ static void test_odbc_provider(void) propidlist.rgPropertyIDs[i] = propinfoset->rgPropertyInfos[i].dwPropertyID; } - } CoTaskMemFree(propidlist.rgPropertyIDs); CoTaskMemFree(propset);
1
0
0
0
Michael Stefaniuc : dmime: Fixup the Wave track parser.
by Alexandre Julliard
05 Nov '21
05 Nov '21
Module: wine Branch: master Commit: 48f19c76cfd684b1fb3832c44d8cb7553cd62fe5 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=48f19c76cfd684b1fb3832c4…
Author: Michael Stefaniuc <mstefani(a)winehq.org> Date: Thu Nov 4 23:44:01 2021 +0100 dmime: Fixup the Wave track parser. An incomplete patch was prematurely added with 854895f70afeeb3c098ff32318353ec4fe7b9bc1 Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dmime/dmime_private.h | 6 -- dlls/dmime/wavetrack.c | 254 +++++++++++++++++++++++++-------------------- 2 files changed, 142 insertions(+), 118 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=48f19c76cfd684b1fb38…
1
0
0
0
Zebediah Figura : winegstreamer: Implement IWMReaderAdvanced::SetUserProvidedClock().
by Alexandre Julliard
05 Nov '21
05 Nov '21
Module: wine Branch: master Commit: 682093d0bdc24a55fcde37ca4f9cc9ed46c3c7df URL:
https://source.winehq.org/git/wine.git/?a=commit;h=682093d0bdc24a55fcde37ca…
Author: Zebediah Figura <zfigura(a)codeweavers.com> Date: Thu Nov 4 15:46:28 2021 -0500 winegstreamer: Implement IWMReaderAdvanced::SetUserProvidedClock(). Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/winegstreamer/wm_asyncreader.c | 67 ++++++++++++++++++++++++++++--------- dlls/wmvcore/tests/wmvcore.c | 47 ++++++++++++-------------- 2 files changed, 74 insertions(+), 40 deletions(-) diff --git a/dlls/winegstreamer/wm_asyncreader.c b/dlls/winegstreamer/wm_asyncreader.c index d4bd8914dd6..4193d7d75de 100644 --- a/dlls/winegstreamer/wm_asyncreader.c +++ b/dlls/winegstreamer/wm_asyncreader.c @@ -41,6 +41,9 @@ struct async_reader CONDITION_VARIABLE stream_cv; bool running; + + bool user_clock; + QWORD user_time; }; static REFERENCE_TIME get_current_time(const struct async_reader *reader) @@ -85,22 +88,35 @@ static DWORD WINAPI stream_thread(void *arg) hr = wm_reader_get_stream_sample(&reader->reader.streams[i], &sample, &pts, &duration, &flags); if (hr == S_OK) { - for (;;) + if (reader->user_clock) { - REFERENCE_TIME current_time = get_current_time(reader); - - if (pts <= current_time - start_time) - break; - - SleepConditionVariableCS(&reader->stream_cv, &reader->stream_cs, - (pts - (current_time - start_time)) / 10000); - + while (pts > reader->user_time && reader->running) + SleepConditionVariableCS(&reader->stream_cv, &reader->stream_cs, INFINITE); if (!reader->running) { INSSBuffer_Release(sample); goto out; } } + else + { + for (;;) + { + REFERENCE_TIME current_time = get_current_time(reader); + + if (pts <= current_time - start_time) + break; + + SleepConditionVariableCS(&reader->stream_cv, &reader->stream_cs, + (pts - (current_time - start_time)) / 10000); + + if (!reader->running) + { + INSSBuffer_Release(sample); + goto out; + } + } + } IWMReaderCallback_OnSample(callback, i, pts, duration, flags, sample, reader->context); INSSBuffer_Release(sample); @@ -276,6 +292,7 @@ static HRESULT WINAPI WMReader_Start(IWMReader *iface, wm_reader_seek(&reader->reader, start, duration); reader->running = true; + reader->user_time = 0; if (!(reader->stream_thread = CreateThread(NULL, 0, stream_thread, reader, 0, NULL))) { @@ -360,9 +377,14 @@ static ULONG WINAPI WMReaderAdvanced_Release(IWMReaderAdvanced6 *iface) static HRESULT WINAPI WMReaderAdvanced_SetUserProvidedClock(IWMReaderAdvanced6 *iface, BOOL user_clock) { - struct async_reader *This = impl_from_IWMReaderAdvanced6(iface); - FIXME("(%p)->(%x)\n", This, user_clock); - return E_NOTIMPL; + struct async_reader *reader = impl_from_IWMReaderAdvanced6(iface); + + TRACE("reader %p, user_clock %d.\n", reader, user_clock); + + EnterCriticalSection(&reader->stream_cs); + reader->user_clock = !!user_clock; + LeaveCriticalSection(&reader->stream_cs); + return S_OK; } static HRESULT WINAPI WMReaderAdvanced_GetUserProvidedClock(IWMReaderAdvanced6 *iface, BOOL *user_clock) @@ -374,9 +396,24 @@ static HRESULT WINAPI WMReaderAdvanced_GetUserProvidedClock(IWMReaderAdvanced6 * static HRESULT WINAPI WMReaderAdvanced_DeliverTime(IWMReaderAdvanced6 *iface, QWORD time) { - struct async_reader *This = impl_from_IWMReaderAdvanced6(iface); - FIXME("(%p)->(%s)\n", This, wine_dbgstr_longlong(time)); - return E_NOTIMPL; + struct async_reader *reader = impl_from_IWMReaderAdvanced6(iface); + + TRACE("reader %p, time %s.\n", reader, debugstr_time(time)); + + EnterCriticalSection(&reader->stream_cs); + + if (!reader->user_clock) + { + LeaveCriticalSection(&reader->stream_cs); + WARN("Not using a user-provided clock; returning E_UNEXPECTED.\n"); + return E_UNEXPECTED; + } + + reader->user_time = time; + + LeaveCriticalSection(&reader->stream_cs); + WakeConditionVariable(&reader->stream_cv); + return S_OK; } static HRESULT WINAPI WMReaderAdvanced_SetManualStreamSelection(IWMReaderAdvanced6 *iface, BOOL selection) diff --git a/dlls/wmvcore/tests/wmvcore.c b/dlls/wmvcore/tests/wmvcore.c index 4cc285c2c73..0e7c6380c92 100644 --- a/dlls/wmvcore/tests/wmvcore.c +++ b/dlls/wmvcore/tests/wmvcore.c @@ -1288,38 +1288,35 @@ static void test_async_reader_streaming(void) * according to their presentation time. Call DeliverTime with the file * duration in order to request all samples as fast as possible. */ hr = IWMReaderAdvanced2_DeliverTime(advanced, 3000 * 10000); - todo_wine ok(hr == E_UNEXPECTED, "Got hr %#x.\n", hr); + ok(hr == E_UNEXPECTED, "Got hr %#x.\n", hr); hr = IWMReaderAdvanced2_SetUserProvidedClock(advanced, TRUE); - todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); - if (hr == S_OK) - { - hr = IWMReaderAdvanced2_DeliverTime(advanced, 3000 * 10000); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#x.\n", hr); + hr = IWMReaderAdvanced2_DeliverTime(advanced, 3000 * 10000); + ok(hr == S_OK, "Got hr %#x.\n", hr); - ret = WaitForSingleObject(callback.eof_event, 1000); - ok(!ret, "Wait timed out.\n"); - ok(callback.got_eof == 1, "Got %u WMT_EOF callbacks.\n", callback.got_eof); + ret = WaitForSingleObject(callback.eof_event, 1000); + ok(!ret, "Wait timed out.\n"); + ok(callback.got_eof == 1, "Got %u WMT_EOF callbacks.\n", callback.got_eof); - hr = IWMReader_Start(reader, 0, 0, 1.0f, (void *)0xfacade); - ok(hr == S_OK, "Got hr %#x.\n", hr); + hr = IWMReader_Start(reader, 0, 0, 1.0f, (void *)0xfacade); + ok(hr == S_OK, "Got hr %#x.\n", hr); - hr = IWMReaderAdvanced2_DeliverTime(advanced, 3000 * 10000); - ok(hr == S_OK, "Got hr %#x.\n", hr); + hr = IWMReaderAdvanced2_DeliverTime(advanced, 3000 * 10000); + ok(hr == S_OK, "Got hr %#x.\n", hr); - ret = WaitForSingleObject(callback.eof_event, 1000); - ok(!ret, "Wait timed out.\n"); - ok(callback.got_eof == 1, "Got %u WMT_EOF callbacks.\n", callback.got_eof); + ret = WaitForSingleObject(callback.eof_event, 1000); + ok(!ret, "Wait timed out.\n"); + ok(callback.got_eof == 1, "Got %u WMT_EOF callbacks.\n", callback.got_eof); - hr = IWMReader_Stop(reader); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ret = WaitForSingleObject(callback.got_stopped, 1000); - ok(!ret, "Wait timed out.\n"); + hr = IWMReader_Stop(reader); + ok(hr == S_OK, "Got hr %#x.\n", hr); + ret = WaitForSingleObject(callback.got_stopped, 1000); + ok(!ret, "Wait timed out.\n"); - hr = IWMReader_Stop(reader); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ret = WaitForSingleObject(callback.got_stopped, 1000); - ok(!ret, "Wait timed out.\n"); - } + hr = IWMReader_Stop(reader); + ok(hr == S_OK, "Got hr %#x.\n", hr); + ret = WaitForSingleObject(callback.got_stopped, 1000); + ok(!ret, "Wait timed out.\n"); test_reader_attributes(profile);
1
0
0
0
Zebediah Figura : winegstreamer: Implement IWMReader::Start().
by Alexandre Julliard
05 Nov '21
05 Nov '21
Module: wine Branch: master Commit: 21dc092b910f80616242761a00d8cdab2f8aa7bd URL:
https://source.winehq.org/git/wine.git/?a=commit;h=21dc092b910f80616242761a…
Author: Zebediah Figura <zfigura(a)codeweavers.com> Date: Thu Nov 4 15:46:27 2021 -0500 winegstreamer: Implement IWMReader::Start(). Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/winegstreamer/wm_asyncreader.c | 167 ++++++++++++++++++++++++++++++++++-- dlls/wmvcore/tests/wmvcore.c | 25 ++++-- 2 files changed, 178 insertions(+), 14 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=21dc092b910f80616242…
1
0
0
0
Zebediah Figura : winegstreamer: Implement IWMReader::SetOutputProps().
by Alexandre Julliard
05 Nov '21
05 Nov '21
Module: wine Branch: master Commit: d7175e265537ffd24dbf8fd3bcaaa1764db03e13 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=d7175e265537ffd24dbf8fd3…
Author: Zebediah Figura <zfigura(a)codeweavers.com> Date: Thu Nov 4 15:46:26 2021 -0500 winegstreamer: Implement IWMReader::SetOutputProps(). Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/winegstreamer/wm_asyncreader.c | 10 ++++++---- dlls/wmvcore/tests/wmvcore.c | 11 ++--------- 2 files changed, 8 insertions(+), 13 deletions(-) diff --git a/dlls/winegstreamer/wm_asyncreader.c b/dlls/winegstreamer/wm_asyncreader.c index e7bf667bf90..860ec1cdd5e 100644 --- a/dlls/winegstreamer/wm_asyncreader.c +++ b/dlls/winegstreamer/wm_asyncreader.c @@ -123,11 +123,13 @@ static HRESULT WINAPI WMReader_GetOutputProps(IWMReader *iface, DWORD output, IW return wm_reader_get_output_props(&reader->reader, output, props); } -static HRESULT WINAPI WMReader_SetOutputProps(IWMReader *iface, DWORD output_num, IWMOutputMediaProps *output) +static HRESULT WINAPI WMReader_SetOutputProps(IWMReader *iface, DWORD output, IWMOutputMediaProps *props) { - struct async_reader *This = impl_from_IWMReader(iface); - FIXME("(%p)->(%u %p)\n", This, output_num, output); - return E_NOTIMPL; + struct async_reader *reader = impl_from_IWMReader(iface); + + TRACE("reader %p, output %u, props %p.\n", reader, output, props); + + return wm_reader_set_output_props(&reader->reader, output, props); } static HRESULT WINAPI WMReader_GetOutputFormatCount(IWMReader *iface, DWORD output, DWORD *count) diff --git a/dlls/wmvcore/tests/wmvcore.c b/dlls/wmvcore/tests/wmvcore.c index 666cf65a462..c1972b29eb9 100644 --- a/dlls/wmvcore/tests/wmvcore.c +++ b/dlls/wmvcore/tests/wmvcore.c @@ -1483,14 +1483,7 @@ static void test_async_reader_types(void) check_video_type(mt); hr = IWMReader_SetOutputProps(reader, output_number, output_props); - todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); - if (hr != S_OK) - { - ref = IWMOutputMediaProps_Release(output_props); - ok(!ref, "Got outstanding refcount %d.\n", ref); - winetest_pop_context(); - continue; - } + ok(hr == S_OK, "Got hr %#x.\n", hr); hr = IWMReader_SetOutputProps(reader, 1 - output_number, output_props); if (!i) ok(hr == NS_E_INCOMPATIBLE_FORMAT /* win < 8, win10 1507-1809 */ @@ -1498,7 +1491,7 @@ static void test_async_reader_types(void) else todo_wine ok(hr == NS_E_INVALID_REQUEST, "Got hr %#x.\n", hr); hr = IWMReader_SetOutputProps(reader, 2, output_props); - todo_wine ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); hr = IWMReader_GetOutputProps(reader, output_number, &output_props2); ok(hr == S_OK, "Got hr %#x.\n", hr);
1
0
0
0
← Newer
1
...
75
76
77
78
79
80
81
...
96
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
Results per page:
10
25
50
100
200