| |||
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
|
kEventWindowCursorChange Hey all, First a word of warning, though I’ve been programming
for Windows for quite some time, I’m very new to OS X. So if my
question is obvious, I apologize. My goal is to get a notification when the mouse leaves my window
content region (in 10.3+). I saw kEventMouseExited and decided to try to
use that. I added a call to CreateMouseTrackingRegion, passing in the
region returned by GetWindowRegion(kWindowContentRegion) and
kMouseTrackingOptionsGlobalClip. But even after realizing I needed to
call SetMouseTrackingRegionEnabled(true), I still never get any events. As an experiment, I created a Rect slightly smaller than the
size of my window (about 10 pixels on each side) and passed that in to
CreateMouseTrackingRegion with kMouseTrackingOptionsLocalClip. After
doing that I started to get kEventMouseExited events. However, I noticed
that if I moved the mouse very quickly (fast enough that I don’t get
mouse moved events inside that 10 pixel boundary), then I don’t get
kEventMouseExited. As another failed experiment (based on something I saw in
google) I tried catching kEventWindowCursorChange in my application event
handler, but that too didn’t catch mouse moves that weren’t over my
window. So I need some way to get a notification when the mouse is leaving
the content region of my window – what other options are there? Thanks, Matthew |
_______________________________________________ Do not post admin requests to the list. They will be ignored. Carbon-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/carbon-dev/email@hidden This email sent to email@hidden
| Home | Archives | FAQ | Terms/Conditions | Contact | RSS | Lists | About |
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE
Contact Apple | Terms of Use | Privacy Policy
Copyright © 2007 Apple Inc. All rights reserved.