changeset 1132:6d618dcff792

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.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Tue, 06 Sep 2011 14:47:39 +0000
parents 5d27b8562c6f
children 25bea6526ca1
files win/dw.c
diffstat 1 files changed, 1 insertions(+), 16 deletions(-) [+]
line wrap: on
line diff
--- 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);