WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
61211
Applications can't set a custom mouse cursor by subclassing WKView and overriding WM_SETCURSOR
https://bugs.webkit.org/show_bug.cgi?id=61211
Summary
Applications can't set a custom mouse cursor by subclassing WKView and overri...
Adam Roben (:aroben)
Reported
2011-05-20 13:45:34 PDT
WebKit2 calls ::SetCursor after every mouse move. This makes it hard for anyone else to set the cursor when the mouse is over a WKView (e.g., if the app subclassed the WKView and wants to change the mouse cursor). We should only be calling ::SetCursor in response to WM_SETCURSOR. This matches WebKit1 and is what MSDN recommends.
Attachments
Only call ::SetCursor in response to WM_SETCURSOR
(1.79 KB, patch)
2011-05-20 13:53 PDT
,
Adam Roben (:aroben)
aroben
: review-
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Adam Roben (:aroben)
Comment 1
2011-05-20 13:46:13 PDT
<
rdar://problem/9478564
>
Adam Roben (:aroben)
Comment 2
2011-05-20 13:53:51 PDT
Created
attachment 94266
[details]
Only call ::SetCursor in response to WM_SETCURSOR
Darin Adler
Comment 3
2011-05-20 13:55:40 PDT
Comment on
attachment 94266
[details]
Only call ::SetCursor in response to WM_SETCURSOR How can we trigger a cursor change without moving the mouse, then? Is there some way to cause a WM_SETCURSOR message to be sent even though we are not moving the mouse?
Adam Roben (:aroben)
Comment 4
2011-05-23 07:33:59 PDT
(In reply to
comment #3
)
> (From update of
attachment 94266
[details]
) > How can we trigger a cursor change without moving the mouse, then? Is there some way to cause a WM_SETCURSOR message to be sent even though we are not moving the mouse?
You're right that this is an issue with this patch. It turns out I was wrong about WebKit1 only calling ::SetCursor in response to WM_SETCURSOR; it also calls it whenever ChromeClient::setCursor is called. I have a new patch that fixes the issue for client applications while still allowing the cursor to change without moving the mouse. I'll attach it in a moment. Thanks for reviewing carefully!
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug