Win-specific: Small optimization in scan libraries

This commit is contained in:
Abs62 2011-12-18 15:48:24 +04:00
parent a5cb580aee
commit 3975cd0082

View file

@ -118,9 +118,15 @@ DWORD wso;
if( !GetCursorPos( &curPt ) ) if( !GetCursorPos( &curPt ) )
break; break;
if( GlobalData == NULL || GlobalData->LastPt.x != curPt.x || GlobalData->LastPt.y != curPt.y)
break;
if( ( targetWnd = GetWindowFromPoint( curPt ) ) == NULL ) if( ( targetWnd = GetWindowFromPoint( curPt ) ) == NULL )
break; break;
if( GlobalData->LastWND != targetWnd )
break;
GetWindowThreadProcessId( targetWnd, &winProcessID ); GetWindowThreadProcessId( targetWnd, &winProcessID );
if( winProcessID != ourProcessID ) { if( winProcessID != ourProcessID ) {
char className[64]; char className[64];
@ -130,10 +136,6 @@ DWORD wso;
break; break;
} }
if( GlobalData == NULL || GlobalData->LastWND != targetWnd ||
GlobalData->LastPt.x != curPt.x || GlobalData->LastPt.y != curPt.y)
break;
SendWordToServer(); SendWordToServer();
break; break;