# HG changeset patch # User bsmith@81767d24-ef19-dc11-ae90-00e081727c95 # Date 1315320459 0 # Node ID 6d618dcff7929b59b3aff24a3f8436c2ff810d52 # Parent 5d27b8562c6fa3bbb596646ca48a938b76ff2f3c Check that the return code isn't TRUE before passing to handlers on Windows. The -1 check was causing the handlers to not be called when they should be. diff -r 5d27b8562c6f -r 6d618dcff792 win/dw.c --- a/win/dw.c Fri Sep 02 18:02:29 2011 +0000 +++ b/win/dw.c Tue Sep 06 14:47:39 2011 +0000 @@ -2196,21 +2196,6 @@ if ( strnicmp(tmpbuf, FRAMECLASSNAME, strlen(FRAMECLASSNAME)+1 ) == 0 ) { int value = _HandleScroller(hWnd, bar, (int)HIWORD(mp1), (int)LOWORD(mp1)); -#ifndef SCROLLBOX_DEBUG - /* - * now we have the position we need to scroll the client window - * and set the scrollbar to the specified position - */ - _dw_log( "After _HandleScroller: Got scroll for scrollbox: %d Handle %x hWnd %x\n", value,handle, hWnd ); - if(value > -1) - { - char lasterror[257]; - SetScrollPos(hWnd, bar, value, TRUE); - FormatMessage( FORMAT_MESSAGE_FROM_SYSTEM, NULL, GetLastError(), MAKELANGID( LANG_NEUTRAL, SUBLANG_DEFAULT), lasterror, 256, NULL); - _dw_log( "Error from setscrollpos: %s", lasterror ); -// dw_scrollbar_set_pos(handle, value); - } -#endif } } } @@ -2817,7 +2802,7 @@ } } - if(ret == -1) + if(ret != TRUE) { if(!pOldProc) return DefWindowProc(hWnd, msg, mp1, mp2);