Sounds good to me! On the other hand it also does feel like a bit of code 
duplication.
Should the behaviour for a GHOST_kEventTrackpad ever change, the 
GHOST_kEventTrackpad must also be modified.
Updated the tracker though, as I definitely see where you're coming from as 
well. =)
Also, I just copied the if-else structure from the GHOST_kEventTrackpad bit of 
the function, though personally I'd use a ternary operator here. Are there any 
guidelines on whether or not, or when to use these?
I couldn't find anything on this in the CodeStyle doc.

-Patrick

> Date: Sat, 31 Mar 2012 16:58:14 -0400
> From: significant....@gmail.com
> To: bf-committers@blender.org
> Subject: Re: [Bf-committers] User Preferences Option for Multitouch Gestures
> 
> 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_boel...@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
> _______________________________________________
> Bf-committers mailing list
> Bf-committers@blender.org
> http://lists.blender.org/mailman/listinfo/bf-committers
                                          
_______________________________________________
Bf-committers mailing list
Bf-committers@blender.org
http://lists.blender.org/mailman/listinfo/bf-committers

Reply via email to