From 51eb48d73b5b31849800d5c03f93c3594335e909 Mon Sep 17 00:00:00 2001 From: "av%netscape.com" Date: Fri, 16 Jul 1999 20:02:20 +0000 Subject: [PATCH] Adding SETFOCUS event for winless plugin fixing crash --- widget/src/windows/nsWindow.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/widget/src/windows/nsWindow.cpp b/widget/src/windows/nsWindow.cpp index d2335149a545..e188c52ce6cc 100644 --- a/widget/src/windows/nsWindow.cpp +++ b/widget/src/windows/nsWindow.cpp @@ -526,6 +526,22 @@ PRBool nsWindow::DispatchStandardEvent(PRUint32 aMsg) event.eventStructType = NS_GUI_EVENT; 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); NS_RELEASE(event.widget); return result;