diff --git a/src/com/android/wallpaper/livepicker/LiveWallpaperPreview.java b/src/com/android/wallpaper/livepicker/LiveWallpaperPreview.java
index a8c91be..54b6382 100644
--- a/src/com/android/wallpaper/livepicker/LiveWallpaperPreview.java
+++ b/src/com/android/wallpaper/livepicker/LiveWallpaperPreview.java
@@ -196,10 +196,28 @@
         if (ev.getAction() == MotionEvent.ACTION_DOWN) {
             onUserInteraction();
         }
-        if (getWindow().superDispatchTouchEvent(ev)) {
-            return true;
+        boolean handled = getWindow().superDispatchTouchEvent(ev);
+        if (!handled) {
+            handled = onTouchEvent(ev);
         }
-        return onTouchEvent(ev);
+
+        if (!handled && mWallpaperConnection != null && mWallpaperConnection.mEngine != null) {
+            int action = ev.getActionMasked();
+            try {
+                if (action == MotionEvent.ACTION_UP) {
+                    mWallpaperConnection.mEngine.dispatchWallpaperCommand(
+                            WallpaperManager.COMMAND_TAP,
+                            (int) ev.getX(), (int) ev.getY(), 0, null);
+                } else if (action == MotionEvent.ACTION_POINTER_UP) {
+                    int pointerIndex = ev.getActionIndex();
+                    mWallpaperConnection.mEngine.dispatchWallpaperCommand(
+                            WallpaperManager.COMMAND_SECONDARY_TAP,
+                            (int) ev.getX(pointerIndex), (int) ev.getY(pointerIndex), 0, null);
+                }
+            } catch (RemoteException e) {
+            }
+        }
+        return handled;
     }
     
     class WallpaperConnection extends IWallpaperConnection.Stub implements ServiceConnection {
