Good morning all:
Does anyone have the scrollbars in a window working with embedded
mozilla on the Macintosh? Here's the code that I'm using to dispatch
the event. (Some error handling and other platform code removed).
nsIViewManager* viewManager = presShell->GetViewManager();
if (!viewManager)
{
return PR_FALSE;
}
nsIView* rootView;
result = viewManager->GetRootView(rootView);
if (NS_FAILED(result) || (! rootView))
{
return PR_FALSE;
}
nsCOMPtr< nsIWidget > widget = rootView->GetWidget();
if (!widget)
{
return PR_FALSE;
}
nsMouseEvent mouseEvent(PR_TRUE, eventIn, widget,
nsMouseEvent::eReal);
mouseEvent.clickCount = 1;
mouseEvent.isShift = 0;
mouseEvent.isControl = 0;
mouseEvent.isAlt = 0;
mouseEvent.isMeta = 0;
mouseEvent.widget = widget;
mouseEvent.nativeMsg = nsnull;
mouseEvent.point.x = xPosIn;
mouseEvent.point.y = yPosIn;
mouseEvent.refPoint.x = xPosIn;
mouseEvent.refPoint.y = yPosIn;
mouseEvent.flags = 0;
nsEventStatus status;
result = viewManager->DispatchEvent(&mouseEvent, &status);
if (NS_FAILED(result))
{
return PR_FALSE;
}
return PR_TRUE;
The status variable after returning from the DispatchEvent method is
nsEventStatus_eIgnore.
After stepping through the code, I believe that there isn't a view/
widget that can (or will) handle the event.
The Windows developers got the scroll-bars to work by applying a
patch from http://www.ubrowser.com/. The patch was
llmozlib_win_src_2006_11_06 Looking at the patch file, I saw that
there were a few changes in the platform independent code, so I
applied the patches to the code. After fixing the compile errors, the
scroll bars were still deaf to events.
I've tried the 2.0.0.12 code too, both virgin and patched, and the
results are the same.
I have added code into my application to support some required
features, and maybe I've broken something, but nothing's obvious (at
least to me).
Any comments on how to solve this problem, or what to check for would
be appreciated.
Best Regards
John Cebasek
Macintosh Programmer
Vizible Corporation
_______________________________________________
dev-embedding mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-embedding