[Bf-committers] User Preferences Option for Multitouch Gestures

Mike Erwin significant.bit at gmail.com
Sat Mar 31 22:58:14 CEST 2012


Patch reviewed -- looks good to me! For the most part...

Doing this in the WM has the additional benefit of affecting all
platforms, not just MacBooks. Yay!

Posting a GHOST event is an okay solution like you say, but might as
well go for the best, right? Which WM event type is generated in
response to a GHOST_kEventWheel? Just make one of those and let the
rest of that function handle it in the usual way. I'm guessing
wm_event_add_ghostevent puts things at the end of the queue, so the
(new) wheel event would be processed after events that actually
happened later. Does this matter? Maybe, maybe not. But it's simple to
avoid the issue by constructing a WM event instead.

Hope this was helpful!

Mike Erwin
musician, naturalist, pixel pusher, hacker extraordinaire



On Sat, Mar 31, 2012 at 12:12 PM, patrick boelens <p_boelens at msn.com> wrote:
>
> Hey all,
>
> Found some time to revisit this and I think I found a work-around, though I'm not sure if it's considered clean (enough). I've opened a page on the tracker with the diff: http://projects.blender.org/tracker/index.php?func=detail&aid=30746
>
> Basically what I did is I check the user pref status in the wm_event_system. When turned off, it then recalls wm_event_add_ghostevent() with a GHOST_kEventWheel. I'm not sure if this is allowed, but it seemed like an okay solution.
>
> Cheers,
> Patrick


More information about the Bf-committers mailing list