From d89923519b838ff65f07c1f511714223f6ca7174 Mon Sep 17 00:00:00 2001 From: James Tabor Date: Mon, 8 Mar 2010 21:24:47 +0000 Subject: [PATCH] [User32] - David Hedberg Fix return value for EDIT_EM_Scroll and case where EM_SCROLL with page down results in trying to scroll up past the beginning. Sync to wine 1.1.40. svn path=/trunk/; revision=46013 --- reactos/dll/win32/user32/controls/edit.c | 9 ++++++--- reactos/media/doc/README.WINE | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/reactos/dll/win32/user32/controls/edit.c b/reactos/dll/win32/user32/controls/edit.c index 2dccbac3842..683c9dfe72a 100644 --- a/reactos/dll/win32/user32/controls/edit.c +++ b/reactos/dll/win32/user32/controls/edit.c @@ -1648,13 +1648,16 @@ static LRESULT EDIT_EM_Scroll(EDITSTATE *es, INT action) INT vlc = get_vertical_line_count(es); /* check if we are going to move too far */ if(es->y_offset + dy > es->line_count - vlc) - dy = es->line_count - vlc - es->y_offset; + dy = max(es->line_count - vlc, 0) - es->y_offset; /* Notification is done in EDIT_EM_LineScroll */ - if(dy) + if(dy) { EDIT_EM_LineScroll(es, 0, dy); + return MAKELONG((SHORT)dy, (BOOL)TRUE); + } + } - return MAKELONG((SHORT)dy, (BOOL)TRUE); + return (LRESULT)FALSE; } diff --git a/reactos/media/doc/README.WINE b/reactos/media/doc/README.WINE index 78a24c54163..6bdb1f2b3b3 100644 --- a/reactos/media/doc/README.WINE +++ b/reactos/media/doc/README.WINE @@ -232,7 +232,7 @@ snmpapi - User32 - reactos/dll/win32/user32/controls/button.c # Synced to Wine-1_1_39 reactos/dll/win32/user32/controls/combo.c # Synced to Wine-1_1_39 - reactos/dll/win32/user32/controls/edit.c # Synced to Wine-1_1_39 + reactos/dll/win32/user32/controls/edit.c # Synced to Wine-1_1_40 reactos/dll/win32/user32/controls/icontitle.c # Synced to Wine-1_1_39 reactos/dll/win32/user32/controls/listbox.c # Synced to Wine-1_1_39 reactos/dll/win32/user32/controls/scrollbar.c # Forked -- 2.17.1