[webkit-dev] WebView & mouseMoved events

Darin Adler darin at apple.com
Mon Mar 1 13:42:48 PST 2010


On Feb 28, 2010, at 9:16 AM, Alex MacCaw wrote:

> It looks like Apple aren't using the normal mouseMoved events, but rather send them through a NSNotificationCenter.

In, AppKit, mouse moved events are sent to the first responder and passed the responder chain. But WebKit needs them even for views that are not in the responder chain. That’s why WebKit responds to mouse moved notifications instead.

> I don't know where they're created, but I assume it''s something to do with 'WKSetNSWindowShouldPostEventNotifications'. Since that part of the project is closed, I can't see the source to find out why they're not being created.

That function calls a private NSWindow method to tell NSWindow to post notifications for mouse events. It’s just a single method call.

> Anyone know why mouse moved events wouldn't be created?

I think you should reduce your program to a simple test case that shows the mouse move events not being handled. Mouse moved events do work in simple browsers made with WebKit as well as in Safari, so there must be something different about your program.

    -- Darin



More information about the webkit-dev mailing list