Closed
Bug 331349
Opened 19 years ago
Closed 19 years ago
Cocoa widgets do not sent NS_MOUSE_ENTER/NS_MOUSE_EXIT events
Categories
(Core :: Widget: Cocoa, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: jaas, Assigned: jaas)
References
Details
Attachments
(2 files, 4 obsolete files)
|
8.41 KB,
patch
|
mark
:
review+
|
Details | Diff | Splinter Review |
|
4.70 KB,
patch
|
Details | Diff | Splinter Review |
Cocoa widgets do not sent NS_MOUSE_ENTER/NS_MOUSE_EXIT events.
Comment 2•19 years ago
|
||
Comment on attachment 215904 [details] [diff] [review]
fix v1.0
do the x/y coords need to be moved from bottom right to top left? otherwise, seems fine to me.
Cocoa sends enter/exit events for all views in a hierarchy, Gecko wants enter/exit for only the top-level views. That makes things really fairly complicated, the logic in this patch is a bit of a brain twister.
This makes our behavior for NS_MOUSE_ENTER/EXIT match up with GTK2 and Windows. I'm going to test it a bit more tomorrow (I need to sleep!) before requesting review.
This patch also fixes 330594.
Attachment #215904 -
Attachment is obsolete: true
This is the same as the last patch, but includes fixes in the debug code. If you want to test this patch, just uncomment the NSLog statements in the patch.
Attachment #215987 -
Attachment is obsolete: true
Attachment #216038 -
Flags: review?(mark)
Comment on attachment 216038 [details] [diff] [review]
fix v2.1
Dropping my review request - I want to investigate something I discovered.
Attachment #216038 -
Flags: review?(mark)
When looking through nsChildView.mm, I saw some existing stuff about mouse enter/exit, also the tracking rect stuff. I was curious about what that was doing, so I cancelled my review request until I understood it. I understand it now, I cleaned it up in this patch and I'm requesting review on my "fix v2.1" patch again.
While I was looking around I found some unused/unnecessary variables. This patch removes them. We will no longer be supporting Mac OS X 10.2.x on the trunk, so I removed support for that from nsChildView as well. This is cleanup, I'd like to land it before the fix to this bug.
Attachment #216102 -
Flags: review?(mark)
Attachment #216038 -
Flags: review?(mark)
forgot to include some changes in the last patch
Attachment #216102 -
Attachment is obsolete: true
Attachment #216103 -
Flags: review?(mark)
Attachment #216102 -
Flags: review?(mark)
Comment 8•19 years ago
|
||
Comment on attachment 216038 [details] [diff] [review]
fix v2.1
I've been looking at this code for a while now, to really understand.
Instead of re-using mouseEntered and mouseExited for the messy mouse event logic of parent/subviews, how about creating a mouseDidEnterSubview and mouseDidExitSubview to handle those cases?
Comment 9•19 years ago
|
||
*** Bug 330594 has been marked as a duplicate of this bug. ***
Comment 10•19 years ago
|
||
Comment on attachment 216038 [details] [diff] [review]
fix v2.1
Nice work!
+static nsEventStatus sendMouseEvent(PRBool isTrusted, PRUint32 msg, nsIWidget *w, nsMouseEvent::reasonType aReason,
+ NSPoint localEventLocation, nsChildView* receiver)
C/C++ functions should have a leading capital letter.
Attachment #216038 -
Flags: review?(mark) → review+
Comment 11•19 years ago
|
||
Comment on attachment 216103 [details] [diff] [review]
nsChildView cleanup, v1.1
Thanks for separating the cleanup. r=me on both.
Attachment #216103 -
Flags: review?(mark) → review+
Comment 12•19 years ago
|
||
Comment on attachment 216038 [details] [diff] [review]
fix v2.1
r=me conditional on isDescendantOf: check or tests that show it's unneded, as discussed.
| Assignee | ||
Comment 13•19 years ago
|
||
Fix another edge case Mark caught, cleanup. This was checked in.
Attachment #216038 -
Attachment is obsolete: true
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
| Assignee | ||
Comment 14•19 years ago
|
||
"nsChildView cleanup, v1.1" was also landed
| Assignee | ||
Comment 15•19 years ago
|
||
landed followup to set sLastViewEntered to nil when sLastViewEntered gets released/destroyed
You need to log in
before you can comment on or make changes to this bug.
Description
•