mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-03-01 05:48:26 +00:00
Bug 177083. Mozilla won't start on win95. r=kyle, sr=alecf, a=asa
This commit is contained in:
parent
f3907a7439
commit
5e1fd7262c
@ -172,6 +172,7 @@ HINSTANCE Accessible::gmUserLib = 0;
|
||||
LPFNACCESSIBLEOBJECTFROMWINDOW Accessible::gmAccessibleObjectFromWindow = 0;
|
||||
LPFNLRESULTFROMOBJECT Accessible::gmLresultFromObject = 0;
|
||||
LPFNNOTIFYWINEVENT Accessible::gmNotifyWinEvent = 0;
|
||||
LPFNGETGUITHREADINFO Accessible::gmGetGUIThreadInfo = 0;
|
||||
|
||||
|
||||
|
||||
@ -205,17 +206,8 @@ STDMETHODIMP Accessible::NotifyWinEvent(DWORD event,
|
||||
LONG idObjectType,
|
||||
LONG idObject)
|
||||
{
|
||||
// open the dll dynamically
|
||||
if (!gmUserLib)
|
||||
gmUserLib =::LoadLibrary("USER32.DLL");
|
||||
|
||||
if (gmUserLib) {
|
||||
if (!gmNotifyWinEvent)
|
||||
gmNotifyWinEvent = (LPFNNOTIFYWINEVENT)GetProcAddress(gmUserLib,"NotifyWinEvent");
|
||||
|
||||
if (gmNotifyWinEvent)
|
||||
return gmNotifyWinEvent(event, hwnd, idObjectType, idObject);
|
||||
}
|
||||
if (gmNotifyWinEvent)
|
||||
return gmNotifyWinEvent(event, hwnd, idObjectType, idObject);
|
||||
|
||||
return E_FAIL;
|
||||
}
|
||||
@ -1124,6 +1116,18 @@ RootAccessible::RootAccessible(nsIAccessible* aAcc, HWND aWnd):DocAccessible(aAc
|
||||
}
|
||||
prefsInitialized = PR_TRUE;
|
||||
}
|
||||
|
||||
if (!gmUserLib) {
|
||||
gmUserLib =::LoadLibrary("USER32.DLL");
|
||||
}
|
||||
|
||||
if (gmUserLib) {
|
||||
if (!gmNotifyWinEvent)
|
||||
gmNotifyWinEvent = (LPFNNOTIFYWINEVENT)GetProcAddress(gmUserLib,"NotifyWinEvent");
|
||||
if (!gmGetGUIThreadInfo)
|
||||
gmGetGUIThreadInfo = (LPFNGETGUITHREADINFO)GetProcAddress(gmUserLib,"GetGUIThreadInfo");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
RootAccessible::~RootAccessible()
|
||||
@ -1227,11 +1231,12 @@ NS_IMETHODIMP RootAccessible::HandleEvent(PRUint32 aEvent, nsIAccessible* aAcces
|
||||
}
|
||||
|
||||
HWND hWnd = mWnd;
|
||||
if (aEvent == EVENT_FOCUS) {
|
||||
if (aEvent == EVENT_FOCUS && gmGetGUIThreadInfo) {
|
||||
GUITHREADINFO guiInfo;
|
||||
if (!::GetGUIThreadInfo(NULL, &guiInfo))
|
||||
return NS_OK;
|
||||
hWnd = guiInfo.hwndFocus;
|
||||
guiInfo.cbSize = sizeof(GUITHREADINFO);
|
||||
if (gmGetGUIThreadInfo(NULL, &guiInfo)) {
|
||||
hWnd = guiInfo.hwndFocus;
|
||||
}
|
||||
}
|
||||
|
||||
// notify the window system
|
||||
|
@ -62,6 +62,7 @@ struct FlagBits {
|
||||
};
|
||||
|
||||
typedef LRESULT (STDAPICALLTYPE *LPFNNOTIFYWINEVENT)(DWORD event,HWND hwnd,LONG idObjectType,LONG idObject);
|
||||
typedef LRESULT (STDAPICALLTYPE *LPFNGETGUITHREADINFO)(DWORD idThread, GUITHREADINFO* pgui);
|
||||
|
||||
class Accessible : public SimpleDOMNode,
|
||||
public IAccessible,
|
||||
@ -223,13 +224,14 @@ protected:
|
||||
static PRBool gIsCacheDisabled;
|
||||
static PRBool gIsEnumVariantSupportDisabled;
|
||||
|
||||
private:
|
||||
protected:
|
||||
/// the accessible library and cached methods
|
||||
static HINSTANCE gmAccLib;
|
||||
static HINSTANCE gmUserLib;
|
||||
static LPFNACCESSIBLEOBJECTFROMWINDOW gmAccessibleObjectFromWindow;
|
||||
static LPFNLRESULTFROMOBJECT gmLresultFromObject;
|
||||
static LPFNNOTIFYWINEVENT gmNotifyWinEvent;
|
||||
static LPFNGETGUITHREADINFO gmGetGUIThreadInfo;
|
||||
};
|
||||
|
||||
class nsAccessibleEventMap
|
||||
|
Loading…
x
Reference in New Issue
Block a user