diff options
author | scroggo <scroggo@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2011-03-18 22:09:01 +0000 |
---|---|---|
committer | scroggo <scroggo@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2011-03-18 22:09:01 +0000 |
commit | 001b9721896566745052c60ce2c067d19a3cc612 (patch) | |
tree | 8a7ad3f991cda4e993b25c0b70dafa9dcc283ceb | |
parent | b66365f5dd8cba718e1657ee3c85b4406e55f17d (diff) |
Pass motion events in the unix sample app.
Allows dragging and flinging the samples.
git-svn-id: http://skia.googlecode.com/svn/trunk@964 2bbb7eff-a529-9590-31e7-b0007b416f81
-rw-r--r-- | unix_test_app/main.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/unix_test_app/main.cpp b/unix_test_app/main.cpp index d21723602f..dace89ef76 100644 --- a/unix_test_app/main.cpp +++ b/unix_test_app/main.cpp @@ -96,9 +96,9 @@ int main(){ window->handleClick(evt.xbutton.x, evt.xbutton.y, SkView::Click::kUp_State); break; case MotionNotify: - // 'If' statement is unnecessary, since we are only masking for button 1 - if (evt.xbutton.button == Button1) - window->handleClick(evt.xmotion.x, evt.xmotion.y, SkView::Click::kMoved_State); + // Since we are only masking to get the motion events for when Button1 is pressed, + // we can assume the pointer is moving with Button1 pressed. + window->handleClick(evt.xmotion.x, evt.xmotion.y, SkView::Click::kMoved_State); break; case KeyPress: { |