mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-30 17:24:08 +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 ) )
|
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;
|
||||||
|
|
Loading…
Reference in a new issue