user32: Improve window state handling in SetScrollInfo().
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=42038 Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
5b9323400d
commit
92d336263c
|
@ -1750,6 +1750,12 @@ static INT SCROLL_SetScrollInfo( HWND hwnd, INT nBar, LPCSCROLLINFO info, BOOL b
|
||||||
action |= SA_SSI_SHOW;
|
action |= SA_SSI_SHOW;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (nBar == SB_CTL && bRedraw && IsWindowVisible(hwnd) &&
|
||||||
|
(new_flags == ESB_ENABLE_BOTH || new_flags == ESB_DISABLE_BOTH))
|
||||||
|
{
|
||||||
|
EnableWindow(hwnd, new_flags == ESB_ENABLE_BOTH);
|
||||||
|
}
|
||||||
|
|
||||||
if (infoPtr->flags != new_flags) /* check arrow flags */
|
if (infoPtr->flags != new_flags) /* check arrow flags */
|
||||||
{
|
{
|
||||||
infoPtr->flags = new_flags;
|
infoPtr->flags = new_flags;
|
||||||
|
|
|
@ -634,7 +634,6 @@ static void test_SetScrollInfo(void)
|
||||||
si.nPage = 50;
|
si.nPage = 50;
|
||||||
SetScrollInfo(hScroll, SB_CTL, &si, TRUE);
|
SetScrollInfo(hScroll, SB_CTL, &si, TRUE);
|
||||||
ret = IsWindowEnabled(hScroll);
|
ret = IsWindowEnabled(hScroll);
|
||||||
todo_wine
|
|
||||||
ok(ret, "Unexpected enabled state.\n");
|
ok(ret, "Unexpected enabled state.\n");
|
||||||
|
|
||||||
si.fMask = SIF_POS|SIF_RANGE|SIF_PAGE|SIF_DISABLENOSCROLL;
|
si.fMask = SIF_POS|SIF_RANGE|SIF_PAGE|SIF_DISABLENOSCROLL;
|
||||||
|
@ -657,7 +656,6 @@ todo_wine
|
||||||
si.nPage = 100;
|
si.nPage = 100;
|
||||||
SetScrollInfo(hScroll, SB_CTL, &si, TRUE);
|
SetScrollInfo(hScroll, SB_CTL, &si, TRUE);
|
||||||
ret = IsWindowEnabled(hScroll);
|
ret = IsWindowEnabled(hScroll);
|
||||||
todo_wine
|
|
||||||
ok(!ret, "Unexpected enabled state.\n");
|
ok(!ret, "Unexpected enabled state.\n");
|
||||||
|
|
||||||
EnableScrollBar(hScroll, SB_CTL, ESB_DISABLE_BOTH);
|
EnableScrollBar(hScroll, SB_CTL, ESB_DISABLE_BOTH);
|
||||||
|
@ -671,7 +669,6 @@ todo_wine
|
||||||
si.nPage = 41;
|
si.nPage = 41;
|
||||||
SetScrollInfo(hScroll, SB_CTL, &si, TRUE);
|
SetScrollInfo(hScroll, SB_CTL, &si, TRUE);
|
||||||
ret = IsWindowEnabled(hScroll);
|
ret = IsWindowEnabled(hScroll);
|
||||||
todo_wine
|
|
||||||
ok(ret, "Unexpected enabled state.\n");
|
ok(ret, "Unexpected enabled state.\n");
|
||||||
|
|
||||||
DestroyWindow(hScroll);
|
DestroyWindow(hScroll);
|
||||||
|
|
Loading…
Reference in New Issue