Skip to content

Commit

Permalink
Win-specific: ScanPopup: Don't use unsupported word retrieving method…
Browse files Browse the repository at this point in the history
…s for GD own windows
  • Loading branch information
Abs62 committed Mar 28, 2014
1 parent e48b04b commit 90dced0
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions mouseover_win32/TextOutSpy.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ GetWordProc_t GetWordProc = NULL;
GDDataStruct gds;
UINT uGdAskMessage;
WCHAR Buffer[256];
DWORD ourProcessID;
DWORD ourProcessID, gdProcessID, winProcessID;

static HWND GetWindowFromPoint(POINT pt)
{
Expand Down Expand Up @@ -90,6 +90,10 @@ LRESULT lr;
}
}

// Don't use other methods for GD own windows
if( winProcessID == gdProcessID )
return;

if( ( flags & GD_FLAG_METHOD_STANDARD ) != 0 && GetWordProc != 0 ) {
GlobalData->CurMod.WND = GlobalData->LastWND;
GlobalData->CurMod.Pt = GlobalData->LastPt;
Expand Down Expand Up @@ -151,7 +155,7 @@ DWORD wso;
while( 1 ) {
POINT curPt;
HWND targetWnd;
DWORD winProcessID = 0;
winProcessID = 0;

if( !GetCursorPos( &curPt ) )
break;
Expand Down Expand Up @@ -316,6 +320,7 @@ BOOL APIENTRY DllMain (HINSTANCE hInst /* Library instance handle. */ ,
return FALSE;
}
ourProcessID = GetCurrentProcessId();
GetWindowThreadProcessId( GlobalData->ServerWND, &gdProcessID );
if(hSynhroMutex==0) {
hSynhroMutex = CreateMutex(NULL, FALSE, "GoldenDictTextOutSpyMutex");
if(hSynhroMutex==0) {
Expand Down

0 comments on commit 90dced0

Please sign in to comment.