Yes, it worked!

Thanks a lot,

Ranah



"John Turnipseed" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> In article <98iqli$[EMAIL PROTECTED]>, Ranah Livnat
> <[EMAIL PROTECTED]> wrote:
>
> >In PPEmbed, the drop-down menu is empty, while in the Mozilla
> >application it is displayed correctly.
> >
> > Why does this happen and how can this be fixed?
>
> Rahnah,
>
> This happens because PowerPlant gets first chance at all the events
> that occur and it doesn't know what to do with events for windows that
> are not "PowerPlant" windows.
>
> The drop-down menus in Mozilla are implemented on the Mac by creating a
> temporary window to contain the menu items. This window is created with
> a toolbox call rather than a call back into PowerPlant's
> LWindow::CreateWindow().  Therefore, PowerPlant doesn't know what to do
> when it gets an event for these windows, so it just ignores the event.
>
> Though it's certainly not the cleanest solution, the work-around I've
> used is to override the following LEventDispatcher routines in
> CBrowserApp.cpp
>
> EventUpdate
> AdjustCursor
> EventActivate
> EventMouseUp
> EventMouseDown
>
> In each of these routines, I've added appropriate code to check if the
> window the event occurred for is not a PowerPlant window. If it is not
> then I check to see if it's a Mozilla window by using the
> IsRaptorWindow routine found in nsMacMessageSink.
>
> If it's a Mozilla window, I manually pass it into the
> nsMacMessageSink::DispatchEvent routine.  To accomplish this, I've had
> to make mMessageSink in CBrowserShell a public member temporarily.
> This is not a great solution, but it works.
>
> In addition, in CBrowserApp.cpp, I've added a member variable to keep
> track of the last Mozilla window clicked. This is to handle clicks
> outside the "menu" windows. Without this handling, clicking outside the
> "menu" results in the CBrowserWindow being brought in front of the
> modal "Menu" window.  Unless you move the window, you probably wouldn't
> notice.
>
> I've enclosed my copy of CBrowserApp.cpp.  Hope it helps.
>
> -=- John
> ______________________________________________________________________
> John Turnipseed       | "If you had to identify, in one word, the reason
> Mac Driver/Programmer |  why the human race has not achieved, and never
> [EMAIL PROTECTED]   |  will achieve, its full potential, that word
> [EMAIL PROTECTED]    |  would be: 'MEETINGS.'" -- Dave Barry



Reply via email to