mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-27 15:24:05 +00:00
Win-specific: Small optimization in scan libraries
This commit is contained in:
parent
a5cb580aee
commit
3975cd0082
|
@ -118,9 +118,15 @@ DWORD wso;
|
|||
if( !GetCursorPos( &curPt ) )
|
||||
break;
|
||||
|
||||
if( GlobalData == NULL || GlobalData->LastPt.x != curPt.x || GlobalData->LastPt.y != curPt.y)
|
||||
break;
|
||||
|
||||
if( ( targetWnd = GetWindowFromPoint( curPt ) ) == NULL )
|
||||
break;
|
||||
|
||||
if( GlobalData->LastWND != targetWnd )
|
||||
break;
|
||||
|
||||
GetWindowThreadProcessId( targetWnd, &winProcessID );
|
||||
if( winProcessID != ourProcessID ) {
|
||||
char className[64];
|
||||
|
@ -130,10 +136,6 @@ DWORD wso;
|
|||
break;
|
||||
}
|
||||
|
||||
if( GlobalData == NULL || GlobalData->LastWND != targetWnd ||
|
||||
GlobalData->LastPt.x != curPt.x || GlobalData->LastPt.y != curPt.y)
|
||||
break;
|
||||
|
||||
SendWordToServer();
|
||||
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue