Wine-Devel
By thread
wine-devel@list.winehq.org
By month
Messages by month
- ----- 2026 -----
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- 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
February 2018
- 74 participants
- 1541 messages
[PATCH 1/7] mshtml: Merge htmlframebase.c into htmlframe.c.
by Jacek Caban
Signed-off-by: Jacek Caban <jacek(a)codeweavers.com>
---
dlls/mshtml/Makefile.in | 1 -
dlls/mshtml/htmlframe.c | 742
++++++++++++++++++++++++++++++++++++++++++-
dlls/mshtml/htmlframebase.c | 752
--------------------------------------------
3 files changed, 731 insertions(+), 764 deletions(-)
delete mode 100644 dlls/mshtml/htmlframebase.c
Feb. 27, 2018
Re: [PATCH v2] usp10/tests: Cleanup test_ScriptStringXtoCP_CPtoX().
by Aric Stewart
Signed-off-by: Aric Stewart <aric(a)codeweavers.com>
On 2/27/18 2:14 AM, Henri Verbeet wrote:
> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com>
> ---
> v2: Fix "one one" in the test comment, as pointed out by Nikolay.
>
> This supersedes patch 142390.
> ---
> dlls/usp10/tests/usp10.c | 261 ++++++++++++++++++++---------------------------
> 1 file changed, 112 insertions(+), 149 deletions(-)
>
> diff --git a/dlls/usp10/tests/usp10.c b/dlls/usp10/tests/usp10.c
> index c6ae57e..cd2c129 100644
> --- a/dlls/usp10/tests/usp10.c
> +++ b/dlls/usp10/tests/usp10.c
> @@ -3171,25 +3171,16 @@ static void test_ScriptString(HDC hdc)
> ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
> }
>
> +/* Test ScriptStringXtoCP() and ScriptStringCPtoX(). Since fonts may differ
> + * between Windows and Wine, the test generates values using one function, and
> + * then verifies the output is consistent with the output of the other. */
> static void test_ScriptStringXtoCP_CPtoX(HDC hdc)
> {
> -/*****************************************************************************************
> - *
> - * This test is for the ScriptStringXtoCP and ScriptStringXtoCP functions. Due to the
> - * nature of the fonts between Windows and Wine, the test is implemented by generating
> - * values using one one function then checking the output of the second. In this way
> - * the validity of the functions is established using Windows as a base and confirming
> - * similar behaviour in wine.
> - */
> -
> HRESULT hr;
> static const WCHAR teststr1[] = {0x05e9, 'i', 0x05dc, 'n', 0x05d5, 'e', 0x05dd, '.',0};
> static const BOOL rtl[] = {1, 0, 1, 0, 1, 0, 1, 0};
> unsigned int String_len = ARRAY_SIZE(teststr1) - 1;
> int Glyphs = String_len * 2 + 16; /* size of buffer as recommended */
> - int Charset = -1; /* unicode */
> - DWORD Flags = SSA_GLYPHS;
> - int ReqWidth = 100;
> static const BYTE InClass[ARRAY_SIZE(teststr1) - 1];
> SCRIPT_STRING_ANALYSIS ssa = NULL;
>
> @@ -3198,163 +3189,135 @@ static void test_ScriptStringXtoCP_CPtoX(HDC hdc)
> int Cp; /* Character position in string */
> int X;
> int trail,lead;
> - BOOL fTrailing;
>
> /* Test with hdc, this should be a valid test. Here we generate a
> * SCRIPT_STRING_ANALYSIS that will be used as input to the following
> * character-positions-to-X and X-to-character-position functions. */
> - hr = ScriptStringAnalyse(hdc, &teststr1, String_len, Glyphs, Charset,
> - Flags, ReqWidth, NULL, NULL, NULL, NULL, InClass, &ssa);
> + hr = ScriptStringAnalyse(hdc, &teststr1, String_len, Glyphs, -1,
> + SSA_GLYPHS, 100, NULL, NULL, NULL, NULL, InClass, &ssa);
> ok(hr == S_OK || broken(hr == E_INVALIDARG) /* NT */,
> "Got unexpected hr %08x.\n", hr);
> + if (hr != S_OK)
> + return;
> + ok(!!ssa, "Got unexpected ssa %p.\n", ssa);
>
> - if (hr == S_OK)
> + /* Loop to generate character positions to provide starting positions for
> + * the ScriptStringCPtoX() and ScriptStringXtoCP() functions. */
> + for (Cp = 0; Cp < String_len; ++Cp)
> {
> - ok(ssa != NULL, "ScriptStringAnalyse ssa should not be NULL\n");
> -
> - /*
> - * Loop to generate character positions to provide starting positions for the
> - * ScriptStringCPtoX and ScriptStringXtoCP functions
> - */
> - for (Cp = 0; Cp < String_len; Cp++)
> - {
> - /* The fTrailing flag is used to indicate whether the X being returned is at
> - * the beginning or the end of the character. What happens here is that if
> - * fTrailing indicates the end of the character, ie. FALSE, then ScriptStringXtoCP
> - * returns the beginning of the next character and iTrailing is FALSE. So for this
> - * loop iTrailing will be FALSE in both cases.
> - */
> - hr = ScriptStringCPtoX(ssa, Cp, TRUE, &trail);
> - ok(hr == S_OK, "ScriptStringCPtoX should return S_OK not %08x\n", hr);
> - hr = ScriptStringCPtoX(ssa, Cp, FALSE, &lead);
> - ok(hr == S_OK, "ScriptStringCPtoX should return S_OK not %08x\n", hr);
> - if (rtl[Cp])
> - ok(lead > trail, "Leading values should be after trailing for rtl characters(%i)\n",Cp);
> - else
> - ok(lead < trail, "Trailing values should be after leading for ltr characters(%i)\n",Cp);
> -
> - /* move by 1 pixel so that we are not between 2 characters. That could result in being the lead of a rtl and
> - at the same time the trail of an ltr */
> -
> - /* inside the leading edge */
> - X = lead;
> - if (rtl[Cp]) X--; else X++;
> - hr = ScriptStringXtoCP(ssa, X, &Ch, &iTrailing);
> - ok(hr == S_OK, "ScriptStringXtoCP should return S_OK not %08x\n", hr);
> - ok(Cp == Ch, "ScriptStringXtoCP should return Ch = %d not %d for X = %d\n", Cp, Ch, trail);
> - ok(iTrailing == FALSE, "ScriptStringXtoCP should return iTrailing = 0 not %d for X = %d\n",
> - iTrailing, X);
> -
> - /* inside the trailing edge */
> - X = trail;
> - if (rtl[Cp]) X++; else X--;
> - hr = ScriptStringXtoCP(ssa, X, &Ch, &iTrailing);
> - ok(hr == S_OK, "ScriptStringXtoCP should return S_OK not %08x\n", hr);
> - ok(Cp == Ch, "ScriptStringXtoCP should return Ch = %d not %d for X = %d\n", Cp, Ch, trail);
> - ok(iTrailing == TRUE, "ScriptStringXtoCP should return iTrailing = 1 not %d for X = %d\n",
> - iTrailing, X);
> -
> - /* outside the "trailing" edge */
> - if (Cp < String_len-1)
> - {
> - if (rtl[Cp]) X = lead; else X = trail;
> - X++;
> - hr = ScriptStringXtoCP(ssa, X, &Ch, &iTrailing);
> - ok(hr == S_OK, "ScriptStringXtoCP should return S_OK not %08x\n", hr);
> - ok(Cp + 1 == Ch, "ScriptStringXtoCP should return Ch = %d not %d for X = %d\n", Cp + 1, Ch, trail);
> - if (rtl[Cp+1])
> - ok(iTrailing == TRUE, "ScriptStringXtoCP should return iTrailing = 1 not %d for X = %d\n",
> - iTrailing, X);
> - else
> - ok(iTrailing == FALSE, "ScriptStringXtoCP should return iTrailing = 0 not %d for X = %d\n",
> - iTrailing, X);
> - }
> + /* The fTrailing flag is used to indicate whether the X being returned
> + * is at the beginning or the end of the character. What happens here
> + * is that if fTrailing indicates the end of the character, i.e. FALSE,
> + * then ScriptStringXtoCP() returns the beginning of the next
> + * character and iTrailing is FALSE. So for this loop iTrailing will
> + * be FALSE in both cases. */
> + hr = ScriptStringCPtoX(ssa, Cp, TRUE, &trail);
> + ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
> + hr = ScriptStringCPtoX(ssa, Cp, FALSE, &lead);
> + ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
> + ok(rtl[Cp] ? lead > trail : lead < trail,
> + "Got unexpected lead %d, trail %d, for rtl[%u] %u.\n",
> + lead, trail, Cp, rtl[Cp]);
> +
> + /* Move by 1 pixel so that we are not between 2 characters. That could
> + * result in being the lead of a RTL and at the same time the trail of
> + * an LTR. */
> +
> + /* Inside the leading edge. */
> + X = rtl[Cp] ? lead - 1 : lead + 1;
> + hr = ScriptStringXtoCP(ssa, X, &Ch, &iTrailing);
> + ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
> + ok(Ch == Cp, "Got unexpected Ch %d for X %d, expected %d.\n", Ch, X, Cp);
> + ok(!iTrailing, "Got unexpected iTrailing %#x for X %d.\n", iTrailing, X);
>
> - /* outside the "leading" edge */
> - if (Cp != 0)
> - {
> - if (rtl[Cp]) X = trail; else X = lead;
> - X--;
> - hr = ScriptStringXtoCP(ssa, X, &Ch, &iTrailing);
> - ok(hr == S_OK, "ScriptStringXtoCP should return S_OK not %08x\n", hr);
> - ok(Cp - 1 == Ch, "ScriptStringXtoCP should return Ch = %d not %d for X = %d\n", Cp - 1, Ch, trail);
> - if (Cp != 0 && rtl[Cp-1])
> - ok(iTrailing == FALSE, "ScriptStringXtoCP should return iTrailing = 0 not %d for X = %d\n",
> - iTrailing, X);
> - else
> - ok(iTrailing == TRUE, "ScriptStringXtoCP should return iTrailing = 1 not %d for X = %d\n",
> - iTrailing, X);
> - }
> - }
> + /* Inside the trailing edge. */
> + X = rtl[Cp] ? trail + 1 : trail - 1;
> + hr = ScriptStringXtoCP(ssa, X, &Ch, &iTrailing);
> + ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
> + ok(Ch == Cp, "Got unexpected Ch %d for X %d, expected %d.\n", Ch, X, Cp);
> + ok(iTrailing, "Got unexpected iTrailing %#x for X %d.\n", iTrailing, X);
>
> - /* Check beyond the leading boundary of the whole string */
> - if (rtl[0])
> + /* Outside the trailing edge. */
> + if (Cp < String_len - 1)
> {
> - /* having a leading rtl character seems to confuse usp */
> - /* this looks to be a windows bug we should emulate */
> - hr = ScriptStringCPtoX(ssa, 0, TRUE, &X);
> - ok(hr == S_OK, "ScriptStringCPtoX should return S_OK not %08x\n", hr);
> - X--;
> + X = rtl[Cp] ? lead + 1 : trail + 1;
> hr = ScriptStringXtoCP(ssa, X, &Ch, &iTrailing);
> - ok(hr == S_OK, "ScriptStringXtoCP should return S_OK not %08x\n", hr);
> - ok(Ch == 1, "ScriptStringXtoCP should return Ch = 1 not %d for X outside leading edge when rtl\n", Ch);
> - ok(iTrailing == FALSE, "ScriptStringXtoCP should return iTrailing = 0 not %d for X = outside leading edge when rtl\n",
> - iTrailing);
> + ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
> + ok(Ch == Cp + 1, "Got unexpected Ch %d for X %d, expected %d.\n", Ch, X, Cp + 1);
> + ok(iTrailing == !!rtl[Cp + 1], "Got unexpected iTrailing %#x for X %d, expected %#x.\n",
> + iTrailing, X, !!rtl[Cp + 1]);
> }
> - else
> +
> + /* Outside the leading edge. */
> + if (Cp)
> {
> - hr = ScriptStringCPtoX(ssa, 0, FALSE, &X);
> - ok(hr == S_OK, "ScriptStringCPtoX should return S_OK not %08x\n", hr);
> - X--;
> + X = rtl[Cp] ? trail - 1 : lead - 1;
> hr = ScriptStringXtoCP(ssa, X, &Ch, &iTrailing);
> - ok(hr == S_OK, "ScriptStringXtoCP should return S_OK not %08x\n", hr);
> - ok(Ch == -1, "ScriptStringXtoCP should return Ch = -1 not %d for X outside leading edge\n", Ch);
> - ok(iTrailing == TRUE, "ScriptStringXtoCP should return iTrailing = 1 not %d for X = outside leading edge\n",
> - iTrailing);
> + ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
> + ok(Ch == Cp - 1, "Got unexpected Ch %d for X %d, expected %d.\n", Ch, X, Cp - 1);
> + ok(iTrailing == !rtl[Cp - 1], "Got unexpected iTrailing %#x for X %d, expected %#x.\n",
> + iTrailing, X, !rtl[Cp - 1]);
> }
> + }
>
> - /* Check beyond the end boundary of the whole string */
> - if (rtl[String_len-1])
> - {
> - hr = ScriptStringCPtoX(ssa, String_len-1, FALSE, &X);
> - ok(hr == S_OK, "ScriptStringCPtoX should return S_OK not %08x\n", hr);
> - }
> - else
> - {
> - hr = ScriptStringCPtoX(ssa, String_len-1, TRUE, &X);
> - ok(hr == S_OK, "ScriptStringCPtoX should return S_OK not %08x\n", hr);
> - }
> - X++;
> + /* Check beyond the leading boundary of the whole string. */
> + if (rtl[0])
> + {
> + /* Having a leading RTL character seems to confuse usp. This looks to
> + * be a Windows bug we should emulate. */
> + hr = ScriptStringCPtoX(ssa, 0, TRUE, &X);
> + ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
> + --X;
> hr = ScriptStringXtoCP(ssa, X, &Ch, &iTrailing);
> - ok(hr == S_OK, "ScriptStringXtoCP should return S_OK not %08x\n", hr);
> - ok(Ch == String_len, "ScriptStringXtoCP should return Ch = %i not %d for X outside trailing edge\n", String_len, Ch);
> - ok(iTrailing == FALSE, "ScriptStringXtoCP should return iTrailing = 0 not %d for X = outside trailing edge\n",
> - iTrailing);
> -
> - /*
> - * Cleanup the SSA for the next round of tests
> - */
> - hr = ScriptStringFree(&ssa);
> - ok(hr == S_OK, "ScriptStringFree should return S_OK not %08x\n", hr);
> -
> - /* Test to see that exceeding the number of characters returns
> - * E_INVALIDARG. First generate an SSA for the subsequent tests. */
> - hr = ScriptStringAnalyse(hdc, &teststr1, String_len, Glyphs, Charset,
> - Flags, ReqWidth, NULL, NULL, NULL, NULL, InClass, &ssa);
> - ok(hr == S_OK, "ScriptStringAnalyse should return S_OK not %08x\n", hr);
> -
> - /*
> - * When ScriptStringCPtoX is called with a character position Cp that exceeds the
> - * string length, return E_INVALIDARG. This also invalidates the ssa so a
> - * ScriptStringFree should also fail.
> - */
> - fTrailing = FALSE;
> - Cp = String_len + 1;
> - hr = ScriptStringCPtoX(ssa, Cp, fTrailing, &X);
> - ok(hr == E_INVALIDARG, "ScriptStringCPtoX should return E_INVALIDARG not %08x\n", hr);
> + ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
> + ok(Ch == 1, "Got unexpected Ch %d.\n", Ch);
> + ok(!iTrailing, "Got unexpected iTrailing %#x.\n", iTrailing);
> + }
> + else
> + {
> + hr = ScriptStringCPtoX(ssa, 0, FALSE, &X);
> + ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
> + --X;
> + hr = ScriptStringXtoCP(ssa, X, &Ch, &iTrailing);
> + ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
> + ok(Ch == -1, "Got unexpected Ch %d.\n", Ch);
> + ok(iTrailing, "Got unexpected iTrailing %#x.\n", iTrailing);
> + }
>
> - ScriptStringFree(&ssa);
> + /* Check beyond the end boundary of the whole string. */
> + if (rtl[String_len - 1])
> + {
> + hr = ScriptStringCPtoX(ssa, String_len - 1, FALSE, &X);
> + ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
> }
> + else
> + {
> + hr = ScriptStringCPtoX(ssa, String_len - 1, TRUE, &X);
> + ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
> + }
> + ++X;
> + hr = ScriptStringXtoCP(ssa, X, &Ch, &iTrailing);
> + ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
> + ok(Ch == String_len, "Got unexpected Ch %d, expected %d.\n", Ch, String_len);
> + ok(!iTrailing, "Got unexpected iTrailing %#x.\n", iTrailing);
> +
> + /* Cleanup the SSA for the next round of tests. */
> + hr = ScriptStringFree(&ssa);
> + ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
> +
> + /* Test to see that exceeding the number of characters returns
> + * E_INVALIDARG. First generate an SSA for the subsequent tests. */
> + hr = ScriptStringAnalyse(hdc, &teststr1, String_len, Glyphs, -1,
> + SSA_GLYPHS, 100, NULL, NULL, NULL, NULL, InClass, &ssa);
> + ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
> +
> + /* When ScriptStringCPtoX() is called with a character position that
> + * exceeds the string length, return E_INVALIDARG. This also invalidates
> + * the ssa so a ScriptStringFree() should also fail. */
> + hr = ScriptStringCPtoX(ssa, String_len + 1, FALSE, &X);
> + ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr);
> +
> + ScriptStringFree(&ssa);
> }
>
> static HWND create_test_window(void)
>
Feb. 27, 2018
Re: [PATCH] comctl32/tooltips: Set window size before TTN_SHOW and preserve it after
by Marvin
Hi,
While running your changed tests on Windows, I think I found new failures.
Being a bot and all I'm not very good at pattern recognition, so I might be
wrong, but could you please double-check?
Full results can be found at
https://testbot.winehq.org/JobDetails.pl?Key=36233
Your paranoid android.
=== build (build) ===
Patch failed to apply
Feb. 27, 2018
[PATCH] comctl32/tooltips: Set window size before TTN_SHOW and preserve it after
by Nikolay Sivov
From: Roman Pišl <rpisl(a)seznam.cz>
Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com>
---
For https://bugs.winehq.org/show_bug.cgi?id=14336
dlls/comctl32/tests/tooltips.c | 1 -
dlls/comctl32/tooltips.c | 27 +++++++++++++--------------
2 files changed, 13 insertions(+), 15 deletions(-)
diff --git a/dlls/comctl32/tests/tooltips.c b/dlls/comctl32/tests/tooltips.c
index 7f37d5fc97..af95a569bb 100644
--- a/dlls/comctl32/tests/tooltips.c
+++ b/dlls/comctl32/tests/tooltips.c
@@ -304,7 +304,6 @@ static LRESULT WINAPI parent_wnd_proc(HWND hwnd, UINT message, WPARAM wParam, LP
break;
case TTN_SHOW:
GetWindowRect(hdr->hwndFrom, &rect);
- todo_wine
ok(!EqualRect(&g_ttip_rect, &rect), "Unexpected window rectangle.\n");
break;
}
diff --git a/dlls/comctl32/tooltips.c b/dlls/comctl32/tooltips.c
index e5b966a004..54601017d6 100644
--- a/dlls/comctl32/tooltips.c
+++ b/dlls/comctl32/tooltips.c
@@ -624,18 +624,10 @@ TOOLTIPS_Show (TOOLTIPS_INFO *infoPtr, BOOL track_activate)
}
toolPtr = &infoPtr->tools[nTool];
-
- TRACE("Show tooltip %d\n", nTool);
-
- hdr.hwndFrom = infoPtr->hwndSelf;
- hdr.idFrom = toolPtr->uId;
- hdr.code = TTN_SHOW;
- SendMessageW (toolPtr->hwnd, WM_NOTIFY, toolPtr->uId, (LPARAM)&hdr);
-
- TRACE("%s\n", debugstr_w(infoPtr->szTipText));
-
TOOLTIPS_CalcTipSize (infoPtr, &size);
- TRACE("size %d x %d\n", size.cx, size.cy);
+
+ TRACE("Show tooltip %d, %s, size %d x %d\n", nTool, debugstr_w(infoPtr->szTipText),
+ size.cx, size.cy);
if (track_activate && (toolPtr->uFlags & TTF_TRACK))
{
@@ -824,9 +816,16 @@ TOOLTIPS_Show (TOOLTIPS_INFO *infoPtr, BOOL track_activate)
* it is no longer needed */
}
- SetWindowPos (infoPtr->hwndSelf, HWND_TOPMOST, rect.left, rect.top,
- rect.right - rect.left, rect.bottom - rect.top,
- SWP_SHOWWINDOW | SWP_NOACTIVATE);
+ SetWindowPos (infoPtr->hwndSelf, NULL, rect.left, rect.top,
+ rect.right - rect.left, rect.bottom - rect.top, SWP_NOZORDER | SWP_NOACTIVATE);
+
+ hdr.hwndFrom = infoPtr->hwndSelf;
+ hdr.idFrom = toolPtr->uId;
+ hdr.code = TTN_SHOW;
+ SendMessageW (toolPtr->hwnd, WM_NOTIFY, toolPtr->uId, (LPARAM)&hdr);
+
+ SetWindowPos (infoPtr->hwndSelf, HWND_TOPMOST, 0, 0, 0, 0,
+ SWP_NOSIZE | SWP_NOMOVE | SWP_SHOWWINDOW | SWP_NOACTIVATE);
/* repaint the tooltip */
InvalidateRect(infoPtr->hwndSelf, NULL, TRUE);
--
2.16.1
Feb. 27, 2018
[PATCH] ntdll: Fix condition mask handling in RtlVerifyVersionInfo
by Nikolay Sivov
From: Sebastian Lackner <sebastian(a)fds-team.de>
Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com>
---
For https://bugs.winehq.org/show_bug.cgi?id=36143
dlls/kernel32/tests/version.c | 14 -------------
dlls/ntdll/version.c | 49 +++++++++++++++++++++++++++++++------------
2 files changed, 36 insertions(+), 27 deletions(-)
diff --git a/dlls/kernel32/tests/version.c b/dlls/kernel32/tests/version.c
index 49a935712a..eb78a383d2 100644
--- a/dlls/kernel32/tests/version.c
+++ b/dlls/kernel32/tests/version.c
@@ -195,9 +195,6 @@ static void test_VerifyVersionInfo(void)
VER_MAJORVERSION, VER_EQUAL,
VER_MINORVERSION, VER_LESS,
- 0, 0,
- 0, 0,
- TRUE,
},
{
VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR,
@@ -278,9 +275,6 @@ static void test_VerifyVersionInfo(void)
VER_SERVICEPACKMAJOR, VER_EQUAL,
VER_SERVICEPACKMINOR, VER_LESS,
- 0, 0,
- 0, 0,
- TRUE,
},
{
VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR,
@@ -298,8 +292,6 @@ static void test_VerifyVersionInfo(void)
VER_MINORVERSION, VER_EQUAL,
VER_SERVICEPACKMAJOR, VER_EQUAL,
VER_SERVICEPACKMINOR, VER_LESS,
- 0, 0,
- TRUE,
},
{
VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR,
@@ -319,7 +311,6 @@ static void test_VerifyVersionInfo(void)
VER_MINORVERSION, VER_EQUAL,
VER_SERVICEPACKMAJOR, VER_EQUAL,
VER_SERVICEPACKMINOR, VER_LESS,
- TRUE,
},
{
VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR,
@@ -362,9 +353,6 @@ static void test_VerifyVersionInfo(void)
VER_MAJORVERSION, VER_EQUAL,
VER_SERVICEPACKMAJOR, VER_LESS,
- 0, 0,
- 0, 0,
- TRUE,
},
{
VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR,
@@ -382,8 +370,6 @@ static void test_VerifyVersionInfo(void)
VER_MAJORVERSION, VER_EQUAL,
VER_MINORVERSION, VER_EQUAL,
VER_SERVICEPACKMAJOR, VER_LESS,
- 0, 0,
- TRUE
},
{
VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR,
diff --git a/dlls/ntdll/version.c b/dlls/ntdll/version.c
index 58ccb950e6..1674261507 100644
--- a/dlls/ntdll/version.c
+++ b/dlls/ntdll/version.c
@@ -657,6 +657,34 @@ BOOLEAN WINAPI RtlGetNtProductType( LPDWORD type )
return TRUE;
}
+static inline UCHAR version_update_condition(UCHAR *last_condition, UCHAR condition)
+{
+ switch (*last_condition)
+ {
+ case 0:
+ *last_condition = condition;
+ break;
+ case VER_EQUAL:
+ if (condition >= VER_EQUAL && condition <= VER_LESS_EQUAL)
+ {
+ *last_condition = condition;
+ return condition;
+ }
+ break;
+ case VER_GREATER:
+ case VER_GREATER_EQUAL:
+ if (condition >= VER_EQUAL && condition <= VER_GREATER_EQUAL)
+ return condition;
+ break;
+ case VER_LESS:
+ case VER_LESS_EQUAL:
+ if (condition == VER_EQUAL || (condition >= VER_LESS && condition <= VER_LESS_EQUAL))
+ return condition;
+ break;
+ }
+ if (!condition) *last_condition |= 0x10;
+ return *last_condition & 0xf;
+}
static inline NTSTATUS version_compare_values(ULONG left, ULONG right, UCHAR condition)
{
@@ -733,38 +761,33 @@ NTSTATUS WINAPI RtlVerifyVersionInfo( const RTL_OSVERSIONINFOEXW *info,
if(dwTypeMask & (VER_MAJORVERSION|VER_MINORVERSION|VER_SERVICEPACKMAJOR|VER_SERVICEPACKMINOR))
{
- unsigned char condition = 0;
+ unsigned char condition, last_condition = 0;
BOOLEAN do_next_check = TRUE;
- if(dwTypeMask & VER_MAJORVERSION)
- condition = dwlConditionMask >> 1*3 & 0x07;
- else if(dwTypeMask & VER_MINORVERSION)
- condition = dwlConditionMask >> 0*3 & 0x07;
- else if(dwTypeMask & VER_SERVICEPACKMAJOR)
- condition = dwlConditionMask >> 5*3 & 0x07;
- else if(dwTypeMask & VER_SERVICEPACKMINOR)
- condition = dwlConditionMask >> 4*3 & 0x07;
-
if(dwTypeMask & VER_MAJORVERSION)
{
+ condition = version_update_condition(&last_condition, dwlConditionMask >> 1*3 & 0x07);
status = version_compare_values(ver.dwMajorVersion, info->dwMajorVersion, condition);
do_next_check = (ver.dwMajorVersion == info->dwMajorVersion) &&
- ((condition != VER_EQUAL) || (status == STATUS_SUCCESS));
+ ((condition >= VER_EQUAL) && (condition <= VER_LESS_EQUAL));
}
if((dwTypeMask & VER_MINORVERSION) && do_next_check)
{
+ condition = version_update_condition(&last_condition, dwlConditionMask >> 0*3 & 0x07);
status = version_compare_values(ver.dwMinorVersion, info->dwMinorVersion, condition);
do_next_check = (ver.dwMinorVersion == info->dwMinorVersion) &&
- ((condition != VER_EQUAL) || (status == STATUS_SUCCESS));
+ ((condition >= VER_EQUAL) && (condition <= VER_LESS_EQUAL));
}
if((dwTypeMask & VER_SERVICEPACKMAJOR) && do_next_check)
{
+ condition = version_update_condition(&last_condition, dwlConditionMask >> 5*3 & 0x07);
status = version_compare_values(ver.wServicePackMajor, info->wServicePackMajor, condition);
do_next_check = (ver.wServicePackMajor == info->wServicePackMajor) &&
- ((condition != VER_EQUAL) || (status == STATUS_SUCCESS));
+ ((condition >= VER_EQUAL) && (condition <= VER_LESS_EQUAL));
}
if((dwTypeMask & VER_SERVICEPACKMINOR) && do_next_check)
{
+ condition = version_update_condition(&last_condition, dwlConditionMask >> 4*3 & 0x07);
status = version_compare_values(ver.wServicePackMinor, info->wServicePackMinor, condition);
}
--
2.16.1
Feb. 27, 2018
[v4 PATCH] comctl32/progress: Fix wrapping of values in PBM_STEPIT and add tests
by Nikolay Sivov
From: Fabian Maurer <dark.shadow4(a)web.de>
Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com>
---
v4: fixed tests
dlls/comctl32/progress.c | 10 +++++++--
dlls/comctl32/tests/progress.c | 51 ++++++++++++++++++++++++++++++++++++++++++
2 files changed, 59 insertions(+), 2 deletions(-)
diff --git a/dlls/comctl32/progress.c b/dlls/comctl32/progress.c
index 80cced4c66..28d9fd2fd3 100644
--- a/dlls/comctl32/progress.c
+++ b/dlls/comctl32/progress.c
@@ -655,8 +655,14 @@ static LRESULT WINAPI ProgressWindowProc(HWND hwnd, UINT message,
INT oldVal;
oldVal = infoPtr->CurVal;
infoPtr->CurVal += infoPtr->Step;
- if(infoPtr->CurVal > infoPtr->MaxVal)
- infoPtr->CurVal = infoPtr->MinVal;
+ if (infoPtr->CurVal > infoPtr->MaxVal)
+ {
+ infoPtr->CurVal = (infoPtr->CurVal - infoPtr->MinVal) % (infoPtr->MaxVal - infoPtr->MinVal) + infoPtr->MinVal;
+ }
+ if (infoPtr->CurVal < infoPtr->MinVal)
+ {
+ infoPtr->CurVal = (infoPtr->CurVal - infoPtr->MinVal) % (infoPtr->MaxVal - infoPtr->MinVal) + infoPtr->MaxVal;
+ }
if(oldVal != infoPtr->CurVal)
{
TRACE("PBM_STEPIT: current pos changed from %d to %d\n", oldVal, infoPtr->CurVal);
diff --git a/dlls/comctl32/tests/progress.c b/dlls/comctl32/tests/progress.c
index 9dd4b55202..d3b219ccca 100644
--- a/dlls/comctl32/tests/progress.c
+++ b/dlls/comctl32/tests/progress.c
@@ -237,6 +237,56 @@ static void test_setcolors(void)
DestroyWindow(progress);
}
+static void test_PBM_STEPIT(void)
+{
+ struct stepit_test
+ {
+ int min;
+ int max;
+ int step;
+ } stepit_tests[] =
+ {
+ { 3, 15, 5 },
+ { 3, 15, -5 },
+ { 3, 15, 50 },
+ };
+ HWND progress;
+ int i, j;
+
+ for (i = 0; i < sizeof(stepit_tests)/sizeof(stepit_tests[0]); i++)
+ {
+ struct stepit_test *test = &stepit_tests[i];
+ LRESULT ret;
+
+ progress = create_progress(0);
+
+ ret = SendMessageA(progress, PBM_SETRANGE32, test->min, test->max);
+ ok(ret != 0, "Unexpected return value.\n");
+
+ SendMessageA(progress, PBM_SETPOS, test->min, 0);
+ SendMessageA(progress, PBM_SETSTEP, test->step, 0);
+
+ for (j = 0; j < test->max; j++)
+ {
+ int pos = SendMessageA(progress, PBM_GETPOS, 0, 0);
+ int current;
+
+ pos += test->step;
+ if (pos > test->max)
+ pos = (pos - test->min) % (test->max - test->min) + test->min;
+ if (pos < test->min)
+ pos = (pos - test->min) % (test->max - test->min) + test->max;
+
+ SendMessageA(progress, PBM_STEPIT, 0, 0);
+
+ current = SendMessageA(progress, PBM_GETPOS, 0, 0);
+ ok(current == pos, "Unexpected position %d, expected %d.\n", current, pos);
+ }
+
+ DestroyWindow(progress);
+ }
+}
+
static void init_functions(void)
{
HMODULE hComCtl32 = LoadLibraryA("comctl32.dll");
@@ -260,6 +310,7 @@ START_TEST(progress)
test_redraw();
test_setcolors();
+ test_PBM_STEPIT();
cleanup();
}
--
2.16.1
Feb. 27, 2018
Re: [v3 PATCH] comctl32/progress: Fix wrapping of values in PBM_STEPIT and add tests
by Nikolay Sivov
Sorry, ignore this one. It's not testing anything.
Feb. 27, 2018
Re: [PATCH 1/3] loader: Set the default ProxyEnable value.
by Alexandre Julliard
Akihiro Sagawa <sagawa.aki(a)gmail.com> writes:
> Without this registry value, Janetter (a Twitter client) crashes on start up.
>
> Signed-off-by: Akihiro Sagawa <sagawa.aki(a)gmail.com>
> ---
> loader/wine.inf.in | 1 +
> 1 file changed, 1 insertion(+)
This should be handled in wininet, where we already manage that key.
--
Alexandre Julliard
julliard(a)winehq.org
Feb. 27, 2018
Re: [PATCH 3/5] d3d9/tests: Use ARRAY_SIZE() macro.
by Marvin
Hi,
While running your changed tests on Windows, I think I found new failures.
Being a bot and all I'm not very good at pattern recognition, so I might be
wrong, but could you please double-check?
Full results can be found at
https://testbot.winehq.org/JobDetails.pl?Key=36228
Your paranoid android.
=== w1064 (32 bit visual) ===
visual.c:8493: Test failed: Got unexpected color 0x00007580 for quad 2 (different colors).
Feb. 27, 2018
[PATCH 5/5] wined3d: Try harder to reacquire context.
by Józef Kucia
From: Józef Kucia <jkucia(a)codeweavers.com>
Signed-off-by: Józef Kucia <jkucia(a)codeweavers.com>
---
dlls/wined3d/context.c | 55 +++++++++++++++++++++++++++++++-------------------
1 file changed, 34 insertions(+), 21 deletions(-)
diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
index df416891463d..32126b7dc078 100644
--- a/dlls/wined3d/context.c
+++ b/dlls/wined3d/context.c
@@ -4170,6 +4170,26 @@ static void context_setup_target(struct wined3d_context *context,
context_set_render_offscreen(context, render_offscreen);
}
+static void context_activate(struct wined3d_context *context,
+ struct wined3d_texture *texture, unsigned int sub_resource_idx)
+{
+ context_enter(context);
+ context_update_window(context);
+ context_setup_target(context, texture, sub_resource_idx);
+ if (!context->valid)
+ return;
+
+ if (context != context_get_current())
+ {
+ if (!context_set_current(context))
+ ERR("Failed to activate the new context.\n");
+ }
+ else if (context->needs_set)
+ {
+ context_set_gl_context(context);
+ }
+}
+
struct wined3d_context *context_acquire(const struct wined3d_device *device,
struct wined3d_texture *texture, unsigned int sub_resource_idx)
{
@@ -4228,21 +4248,7 @@ struct wined3d_context *context_acquire(const struct wined3d_device *device,
context = swapchain_get_context(device->swapchains[0]);
}
- context_enter(context);
- context_update_window(context);
- context_setup_target(context, texture, sub_resource_idx);
- if (!context->valid)
- return context;
-
- if (context != current_context)
- {
- if (!context_set_current(context))
- ERR("Failed to activate the new context.\n");
- }
- else if (context->needs_set)
- {
- context_set_gl_context(context);
- }
+ context_activate(context, texture, sub_resource_idx);
return context;
}
@@ -4250,16 +4256,23 @@ struct wined3d_context *context_acquire(const struct wined3d_device *device,
struct wined3d_context *context_reacquire(const struct wined3d_device *device,
struct wined3d_context *context)
{
- struct wined3d_context *current_context;
+ struct wined3d_context *acquired_context;
+
+ wined3d_from_cs(device->cs);
if (!context || context->tid != GetCurrentThreadId())
return NULL;
- current_context = context_acquire(device, context->current_rt.texture,
- context->current_rt.sub_resource_idx);
- if (current_context != context)
- ERR("Acquired context %p instead of %p.\n", current_context, context);
- return current_context;
+ if (context->current_rt.texture)
+ {
+ context_activate(context, context->current_rt.texture, context->current_rt.sub_resource_idx);
+ return context;
+ }
+
+ acquired_context = context_acquire(device, NULL, 0);
+ if (acquired_context != context)
+ ERR("Acquired context %p instead of %p.\n", acquired_context, context);
+ return acquired_context;
}
void dispatch_compute(struct wined3d_device *device, const struct wined3d_state *state,
--
2.16.1
Feb. 27, 2018