Adding SETFOCUS event for winless plugin fixing crash

This commit is contained in:
av%netscape.com 1999-07-16 20:02:20 +00:00
Родитель 42387e8d66
Коммит 51eb48d73b
1 изменённых файлов: 16 добавлений и 0 удалений

Просмотреть файл

@ -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;