Ignore:
Timestamp:
Oct 12, 2001, 9:05:15 AM (24 years ago)
Author:
phaller
Message:

capture handle cache

File:
1 edited

Legend:

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

    r6972 r7028  
    1 /* $Id: winmouse.cpp,v 1.18 2001-10-09 05:18:05 phaller Exp $ */
     1/* $Id: winmouse.cpp,v 1.19 2001-10-12 07:05:15 phaller Exp $ */
    22/*
    33 * Mouse handler for DINPUT
     
    125125//******************************************************************************
    126126//******************************************************************************
     127
     128// capture handle "cache"
     129static HWND hwndWin32Capture = 0;
     130
    127131ODINFUNCTION0(HWND, GetCapture)
    128132{
    129   return OS2ToWin32Handle(OSLibWinQueryCapture());
     133  if (0 == hwndWin32Capture)
     134    hwndWin32Capture = OS2ToWin32Handle(OSLibWinQueryCapture());
     135 
     136  return hwndWin32Capture;
    130137}
    131138//******************************************************************************
     
    136143  HWND hwndPrev = GetCapture();
    137144  BOOL rc;
    138 
     145 
     146  // invalidate capture "cache"
     147  hwndWin32Capture = 0;
     148 
    139149  if(hwnd == 0)
    140150  {
     
    171181
    172182  hwndPrev = GetCapture();
     183 
     184  // invalidate capture "cache"
     185  hwndWin32Capture = 0;
     186 
    173187  ret = OSLibWinSetCapture(0);
    174188  if(hwndPrev)
Note: See TracChangeset for help on using the changeset viewer.