Changeset 7182 for trunk/src


Ignore:
Timestamp:
Oct 24, 2001, 11:53:14 AM (24 years ago)
Author:
sandervl
Message:

scrollbar fix; don't set focus unless it has the WS_TABSTOP style

Location:
trunk/src/user32
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/user32/scroll.cpp

    r7020 r7182  
    1 /* $Id: scroll.cpp,v 1.44 2001-10-11 17:05:02 sandervl Exp $ */
     1/* $Id: scroll.cpp,v 1.45 2001-10-24 09:53:14 sandervl Exp $ */
    22/*
    33 * Scrollbar control
     
    837837        trackThumbPos = thumbPos;
    838838        prevPt = pt;
    839         if (nBar == SB_CTL) SetFocus(hwnd);
     839        if (nBar == SB_CTL && (GetWindowLongA(hwnd, GWL_STYLE) & WS_TABSTOP)) SetFocus( hwnd );
    840840        SetCapture(hwnd);
    841841        break;
  • trunk/src/user32/window.cpp

    r7095 r7182  
    1 /* $Id: window.cpp,v 1.110 2001-10-17 14:30:10 sandervl Exp $ */
     1/* $Id: window.cpp,v 1.111 2001-10-24 09:53:14 sandervl Exp $ */
    22/*
    33 * Win32 window apis for OS/2
     
    19671967              LPCWSTR, str )
    19681968{
    1969     LPSTR strA;
    1970     HANDLE ret;
    1971 
    1972     if (!HIWORD(str)) return GetPropA( hwnd, (LPCSTR)(UINT)LOWORD(str) );
    1973     strA = HEAP_strdupWtoA( GetProcessHeap(), 0, str );
    1974     ret = GetPropA( hwnd, strA );
    1975     HeapFree( GetProcessHeap(), 0, strA );
     1969  Win32BaseWindow *window;
     1970  LPSTR strA;
     1971  HANDLE ret;
     1972
     1973    window = Win32BaseWindow::GetWindowFromHandle(hwnd);
     1974    if(!window) {
     1975        dprintf(("GetPropW, window %x not found", hwnd));
     1976        SetLastError(ERROR_INVALID_WINDOW_HANDLE);
     1977        return 0;
     1978    }
     1979
     1980    if(HIWORD(str)) {
     1981         strA = HEAP_strdupWtoA( GetProcessHeap(), 0, str );
     1982    }
     1983    else strA = (LPSTR)str;
     1984
     1985    ret = window->getProp(strA);
     1986
     1987    RELEASE_WNDOBJ(window);
     1988    if(HIWORD(str)) HeapFree( GetProcessHeap(), 0, strA );
    19761989    return ret;
    19771990}
Note: See TracChangeset for help on using the changeset viewer.