зеркало из https://github.com/mozilla/gecko-dev.git
Adding SETFOCUS event for winless plugin fixing crash
This commit is contained in:
Родитель
42387e8d66
Коммит
51eb48d73b
|
@ -526,6 +526,22 @@ PRBool nsWindow::DispatchStandardEvent(PRUint32 aMsg)
|
||||||
event.eventStructType = NS_GUI_EVENT;
|
event.eventStructType = NS_GUI_EVENT;
|
||||||
InitEvent(event, aMsg);
|
InitEvent(event, aMsg);
|
||||||
|
|
||||||
|
nsPluginEvent pluginEvent;
|
||||||
|
|
||||||
|
switch (aMsg)//~~~
|
||||||
|
{
|
||||||
|
case NS_GOTFOCUS:
|
||||||
|
pluginEvent.event = WM_SETFOCUS;
|
||||||
|
break;
|
||||||
|
case NS_LOSTFOCUS:
|
||||||
|
pluginEvent.event = WM_KILLFOCUS;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
event.nativeMsg = (void *)&pluginEvent;
|
||||||
|
|
||||||
PRBool result = DispatchWindowEvent(&event);
|
PRBool result = DispatchWindowEvent(&event);
|
||||||
NS_RELEASE(event.widget);
|
NS_RELEASE(event.widget);
|
||||||
return result;
|
return result;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче