Signed-off-by: Jimmy Huang <jimmy.huang@intel.com>
bool scroll_x = false;
bool scroll_y = false;
+ /*
+ * the mouse_info is broken in wayland, can't tell if the click
+ * is clicking or scrolling, putting a check here if the down_x
+ * or down_y number are not normal, assume it's a click
+ */
+
+ if (mouse_info.down_x > 1000 || mouse_info.down_y > 1000)
+ {
+ return false;
+ }
+
if (mouse_info.move_x > mouse_info.down_x + MOVE_THRESHOLD
|| mouse_info.move_x < mouse_info.down_x - MOVE_THRESHOLD)
{