Add a 'fatbits' mode to unix sample app.


git-svn-id: http://skia.googlecode.com/svn/trunk@978 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/unix_test_app/main.cpp b/unix_test_app/main.cpp
index dace89e..deb95bc 100644
--- a/unix_test_app/main.cpp
+++ b/unix_test_app/main.cpp
@@ -73,7 +73,7 @@
 
     // Determine which events to listen for.
     eventMask = StructureNotifyMask|ButtonPressMask|ButtonReleaseMask
-            |ExposureMask|Button1MotionMask|KeyPressMask|KeyReleaseMask;
+            |ExposureMask|PointerMotionMask|KeyPressMask|KeyReleaseMask;
     XSelectInput(dsp, win, eventMask);
  
     bool loop = true;
@@ -96,9 +96,10 @@
                     window->handleClick(evt.xbutton.x, evt.xbutton.y, SkView::Click::kUp_State);
                 break;
             case MotionNotify:
-                // 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);
+                // FIXME: 272 corresponds to the left mouse button, but should be a constant.
+                if (evt.xmotion.state == 272)
+                    window->handleClick(evt.xmotion.x, evt.xmotion.y, SkView::Click::kMoved_State);
+                window->updatePointer(evt.xmotion.x, evt.xmotion.y);
                 break;
             case KeyPress:
             {