I don't know that this is actually the problem; you may have to dig
in a little further.
Actually, we get the original mouse-down but when trying to find
where the mouse is in the view using [contentView hitTest: mouseLoc]
it was always returning the AVHTMLView containing our view, even if
the mouseLoc was in our view and our view was ordered before it and
enabled and isOpaque returned trye.
It turns out that [NSView opaqueAncestor] has code in it specifically
for WebHTMLViews, and even though our view returned isOpaque the
event went to the WebHTMLView ancestor behind your view because of
this code.
Assuming that you will accept that the view you're controlling will
not work as part of a transparent layer (i.e. no warranty is
expressed or implied but it worked for me and I'm willing to live
under those restrictions), you can add this to your own NSView subclass:
- (NSView *)opaqueAncestor {
if ([self isOpaque]) {
return self;
} else {
return [super opaqueAncestor];
}
}
...and try it out. Note that our method flow is different (we don't
specifically send events), but this smells like the same problem.
I should note that this is part of an as-yet unreleased product, and
while our testing has shown no problems, we can't know for sure what
will happen when it goes out to the wider world (can you tell I'm
trying to cover my posterior as much as possible here?)
Hope this helps,
Rudi
On Oct 2, 2006, at 10:10 AM, Nathaniel Martin wrote:
> Yes, I have HTML in the view.
>
> It's pretty simple, no frames, just a few divs and some javascript to
> allow dragging.
>
> Can you describe a bit more about what special mouse-tracking loops
> you had to do?
>
> Thanks for your response!
>
> -Nathaniel
>
> On 10/2/06, Rudi Sherry <email@hidden> wrote:
>> Do you have HTML in the view? I found that WebHTMLView does some
>> strange things with mouse-events and sometimes swallows them; I
>> believe this is to handle HTML layering. I have a plug-in and I had
>> to do special things during mouse-tracking loops whenever my plug-in
>> was inside a frame or embedded, that I didn't have to do with my
>> plug-
>> in was the entire document.
>>
>> Hope this helps,
>> Rudi
>>
>>
>> On Oct 1, 2006, at 10:06 AM, Nathaniel Martin wrote:
>>
>> > Ok, so the firstResponder of the web window is WebFrameView,
>> which is
>> > the first subview of the webView.
>> >
>> > So I tried sending the events to that view using:
>> >
>> > [[[[[GCEGUIManager sharedGUIManager] gceGUIView] subviews]
>> > objectAtIndex:0] mouseDown:fakeEvent];
>> >
>> > But it still doesn't receive the events. Am doing this the wrong
>> way?
>> > Is there some other way to send a mouse click to the webview?
>> >
>> > Also, I thought that if you sent an event to a view, it would
>> send it
>> > to it's subviews. Is that incorrect?
>> >
>> > On 9/30/06, Darin Adler <email@hidden> wrote:
>> >> On Sep 29, 2006, at 11:02 AM, Nathaniel Martin wrote:
>> >>
>> >> > So, where are my mouse clicks going, if they're not going to the
>> >> > webview?
>> >>
>> >> To a subview of the WebView.
>> >>
>> >> -- Darin
>> >>
>> >>
>> > _______________________________________________
>> > Do not post admin requests to the list. They will be ignored.
>> > Webkitsdk-dev mailing list (email@hidden)
>> > Help/Unsubscribe/Update your Subscription:
>> > http://lists.apple.com/mailman/options/webkitsdk-dev/rsherry%
>> > 40adobe.com
>> >
>> > This email sent to email@hidden
>>
>>