[webkit-help] sending mouse events to offscreen WebKit2
hamfiend at gmail.com
Thu Jul 21 10:57:24 PDT 2011
I am creating a VS2005 c++ DirectX application. It runs in both windowed and
full screen mode. I need to display a web browser on top of the DirectX
stuff. I have this working. I created a WebKitWrapper class to create the
webview stuff. I added a DirectX texture to the class. I put the webview
window (HWND) position to be off screen. In my render cycle I basically get
the webview window to draw on the HDC of the directx texture surface. I
needed to add a function in the WKView.h. It was pretty simple.
Now I need to send the off screen web view mouse messages when I click on
the texture on screen.
I tried using SendMessage() to the webview window hwnd. It does partly
work. I do think the messages are getting sent to it. But the problem is it
stealing focus from my main application window.
Here is what happens when I press the mouse button then let it go. The
mouse down is sent to my main window, then it sends it to the webview
window; the webview steals the focus and the mouse up event does not go to
my main application window, and since the up did not really occur on the
webview window, nothing happens.
Is there way way to simulate mouse events to an offscreen WebKit2 webview?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the webkit-help