Re: [PATCH 2/2] user32: scrollbars are vertical by default
On 04.03.2017 23:29, Kees Beets wrote:
Fixes https://bugs.winehq.org/show_bug.cgi?id=38029
Changed calculation of boolean vertical so that default is true.
Tested on Ubuntu 16.04.
Signed-off-by: kbeets68(a)gmail.com --- dlls/user32/scroll.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/user32/scroll.c b/dlls/user32/scroll.c index 4b572e5..202fac8 100644 --- a/dlls/user32/scroll.c +++ b/dlls/user32/scroll.c @@ -252,7 +252,7 @@ static BOOL SCROLL_GetScrollBarRect( HWND hwnd, INT nBar, RECT *lprect,
case SB_CTL: GetClientRect( hwnd, lprect ); - vertical = ((wndPtr->dwStyle & SBS_VERT) != 0); + vertical = ((wndPtr->dwStyle & SBS_HORZ) == 0); break;
default:
Hi, this doesn't look right, SBS_HORZ is 0, which makes 'vertical' always 1.
hi Nikolay, You're right. Somehow for SB_CTL scroll bars the orientation is not always determined correctly, but what I did doesn't make sense at all. I tried to find the real problem, but this is going to cost me more time. Thanks for spotting and I feel a bit embarrassed :). Kind regards, Kees On 03/04/2017 09:35 PM, Nikolay Sivov wrote:
On 04.03.2017 23:29, Kees Beets wrote:
Fixes https://bugs.winehq.org/show_bug.cgi?id=38029
Changed calculation of boolean vertical so that default is true.
Tested on Ubuntu 16.04.
Signed-off-by: kbeets68(a)gmail.com --- dlls/user32/scroll.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/user32/scroll.c b/dlls/user32/scroll.c index 4b572e5..202fac8 100644 --- a/dlls/user32/scroll.c +++ b/dlls/user32/scroll.c @@ -252,7 +252,7 @@ static BOOL SCROLL_GetScrollBarRect( HWND hwnd, INT nBar, RECT *lprect,
case SB_CTL: GetClientRect( hwnd, lprect ); - vertical = ((wndPtr->dwStyle & SBS_VERT) != 0); + vertical = ((wndPtr->dwStyle & SBS_HORZ) == 0); break;
default:
Hi,
this doesn't look right, SBS_HORZ is 0, which makes 'vertical' always 1.
participants (2)
-
Kees Beets -
Nikolay Sivov