only update mouse if the mouse event is not from a touch event
492236
function updateHybridMouse(e) {
  if (input.touch.recentTouch || input.touch.touchOnScreen) return;
  updateMouse(e);
}
1236485
def on_mouse(self, event):
        ''''''
        state = self.state
        pos = event.GetPosition()
        if event.Leaving():
            self.mouse_pos = None
        else:
            self.mouse_pos = pos
        self.update_position()

        if hasattr(event, 'ButtonIsDown'):
            any_button_down = event.ButtonIsDown(wx.MOUSE_BTN_ANY)
            left_button_down = event.ButtonIsDown(wx.MOUSE_BTN_LEFT)
            right_button_down = event.ButtonIsDown(wx.MOUSE_BTN_RIGHT)
        else:
            left_button_down = event.leftIsDown
            right_button_down = event.rightIsDown
            any_button_down = left_button_down or right_button_down

        if any_button_down or event.ButtonUp():
            # send any event with a mouse button to the parent
            latlon = self.coordinates(pos.x, pos.y)
            selected = self.selected_objects(pos)
            state.event_queue.put(SlipMouseEvent(latlon, event, selected))
            if event.RightDown():
                state.popup_object = None
                state.popup_latlon = None
                if len(selected) > 0:
                    obj = state.layers[selected[0].layer][selected[0].objkey]
                    if obj.popup_menu is not None:
                        state.popup_object = obj
                        state.popup_latlon = latlon
                        self.show_popup(obj, pos)
                        state.popup_started = True
                if not state.popup_started and state.default_popup is not None:
                    state.popup_latlon = latlon
                    self.show_default_popup(pos)
                    state.popup_started = True

        if not right_button_down:
            state.popup_started = False

        if event.LeftDown() or event.RightDown():
            self.mouse_down = pos
            self.last_click_pos = self.click_pos
            self.click_pos = self.coordinates(pos.x, pos.y)

        if event.Dragging() and left_button_down:
            # drag map to new position
            newpos = pos
            if self.mouse_down and newpos:
                dx = (self.mouse_down.x - newpos.x)
                dy = -(self.mouse_down.y - newpos.y)
                pdist = math.sqrt(dx**2 + dy**2)
                if pdist > state.drag_step:
                    bearing = math.degrees(math.atan2(dx, dy))
                    distance = (state.ground_width/float(state.width)) * pdist
                    newlatlon = mp_util.gps_newpos(state.lat, state.lon, bearing, distance)
                    (state.lat, state.lon) = newlatlon
                    self.mouse_down = newpos
                    self.redraw_map()
812705
function(inEvent) {
      var lts = this.lastTouches;
      var x = inEvent.clientX, y = inEvent.clientY;
      for (var i = 0, l = lts.length, t; i < l && (t = lts[i]); i++) {
        // simulated mouse events will be swallowed near a primary touchend
        var dx = Math.abs(x - t.x), dy = Math.abs(y - t.y);
        if (dx <= DEDUP_DIST && dy <= DEDUP_DIST) {
          return true;
        }
      }
    }
206079
function () {
        var dom = this.domElement;

        vendor.removeEventListener(dom, 'touchstart', this._mouseDownHandler);
        vendor.removeEventListener(dom, 'touchmove', this._mouseMoveHandler);
        vendor.removeEventListener(dom, 'touchend', this._mouseUpHandler);

        vendor.removeEventListener(dom, 'mousedown', this._mouseDownHandler);
        vendor.removeEventListener(dom, 'mousemove', this._mouseMoveHandler);
        vendor.removeEventListener(dom, 'mouseup', this._mouseUpHandler);
        vendor.removeEventListener(dom, 'wheel', this._mouseWheelHandler);
        vendor.removeEventListener(dom, 'mouseout', this._mouseUpHandler);

        if (this.timeline) {
            this.timeline.off('frame', this.update);
        }
        this.stopAllAnimation();
    }
583743
def mousePressEvent(self, event):
        
        # ignore events when the scene is in view mode
        scene = self.scene()
        if scene and scene.inViewMode():
            event.ignore()
            return

        # block the selection signals
        if scene:
            scene.blockSelectionSignals(True)

            # clear the selection
            if ( not (self.isSelected() or
                              event.modifiers() == Qt.ControlModifier) ):
                for item in scene.selectedItems():
                    if item != self:
                        item.setSelected(False)

        # try to start the connection
        super(XNodeConnection, self).mousePressEvent(event)
621352
function(oEvent) {
			var oTouch;

			if (bHandleEvent) {
				oTouch = oEvent.touches[0];

				// Check if the finger is moved. When the finger was moved, no "click" event is fired.
				if (Math.abs(oTouch.clientX - iStartX) > 10 || Math.abs(oTouch.clientY - iStartY) > 10) {
					bIsMoved = true;
				}

				if (bIsMoved) {

					// Fire "mousemove" event only when the finger was moved. This is to prevent unwanted movements.
					fireMouseEvent("mousemove", oEvent);
				}
			}
		}
1139377
def mousePressEvent(self, event):
        """"""
        if event.button() != Qt.LeftButton:
            QTableView.mousePressEvent(self, event)
            return
        index_clicked = self.indexAt(event.pos())
        if index_clicked.isValid():
            if index_clicked == self.currentIndex() \
               and index_clicked in self.selectedIndexes():
                self.clearSelection()
            else:
                QTableView.mousePressEvent(self, event)
        else:
            self.clearSelection()
            event.accept()
379734
function(e) {
		
		var touch = e.touches[0]
		
		// Make sure click doesn't fire
		touchClientX = touch.clientX
		touchClientY = touch.clientY
		timestamp = Date.now()
	}
848321
function disconnectMouseEvents (scope) {
        var root = (aria.core.Browser.isIE7 || aria.core.Browser.isIE8) ? Aria.$window.document.body : Aria.$window;
        eventUtil.removeListener(root, "mousemove", {
            fn : scope._onMouseMove,
            scope : scope
        });
        eventUtil.removeListener(root, "mouseup", {
            fn : scope._onMouseUp,
            scope : scope
        });
        eventUtil.removeListener(root, "touchmove", {
            fn : scope._onMouseMove,
            scope : scope
        });
        eventUtil.removeListener(root, "touchend", {
            fn : scope._onMouseUp,
            scope : scope
        });
    }
1049004
function (event) {
        if (this.hover === true) {
            this.grabOffset.set(event.gameX, event.gameY);
            this.grabOffset.sub(this.pos);
            this.selected = true;
            // don"t propagate the event furthermore
            return false;
        }
    }
1026782
function stopTouchAndScrollEventPropagation(element, eventList) {
    var eventList = [ 'touchstart', 'touchmove', 'touchend', 'touchcancel',
                      'wheel', 'mousewheel' ];
    for (var i = 0; i < eventList.length; i++) {
      element.addEventListener(eventList[i], function(event) {
        event.stopPropagation();
      });
    }
  }
1223464
function (evt) {
                var event = new ariaDomEvent(evt);

                connectMouseEvents(this);

                if (evt.type === "touchstart") {
                    // The position of touch events is not determined correctly by clientX/Y
                    var elementPosition = ariaTouchEvent.getPositions(event);
                    event.clientX = elementPosition[0].x;
                    event.clientY = elementPosition[0].y;
                }

                if (this._detectDrag(event)) {
                    event.preventDefault(true);
                }

                event.$dispose();
                return false;
            }
517573
function mouseout(inEvent) {
  if (!this.isEventSimulatedFromTouch_(inEvent)) {
    const e = prepareEvent(inEvent, this.dispatcher);
    this.dispatcher.leaveOut(e, inEvent);
  }
}
411117
function ( e ){

                if ( scope_Target.hasAttribute('disabled') ) {
                    return false;
                }

                // Stop if an active 'tap' transition is taking place.
                if ( hasClass(scope_Target, options.cssClasses.tap) ) {
                    return false;
                }

                e = fixEvent(e, data.pageOffset);

                // Handle reject of multitouch
                if ( !e ) {
                    return false;
                }

                // Ignore right or middle clicks on start #454
                if ( events === actions.start && e.buttons !== undefined && e.buttons > 1 ) {
                    return false;
                }

                // Ignore right or middle clicks on start #454
                if ( data.hover && e.buttons ) {
                    return false;
                }

                e.calcPoint = e.points[ options.ort ];

                // Call the event handler with the event [ and additional data ].
                callback ( e, data );
            }
1359610
function ( event ) {

        //if(!event.type) return;

      //  console.log( event.type )

        if( event.type.indexOf( R.prevDefault ) !== -1 ) event.preventDefault(); 

        if( event.type === 'contextmenu' ) return; 

        //if( event.type === 'keydown'){ R.editText( event ); return;}

        //if( event.type !== 'keydown' && event.type !== 'wheel' ) event.preventDefault();
        //event.stopPropagation();

        R.findZone();
       
        var e = R.e;

        if( event.type === 'keydown') R.editText( event );

        if( event.type === 'wheel' ) e.delta = event.deltaY > 0 ? 1 : -1;
        else e.delta = 0;
        
        e.clientX = event.clientX || 0;
        e.clientY = event.clientY || 0;
        e.type = event.type;

        // mobile

        if( R.isMobile ){

            if( event.touches && event.touches.length > 0 ){
        
                e.clientX = event.touches[ 0 ].clientX || 0;
                e.clientY = event.touches[ 0 ].clientY || 0;

            }

            if( event.type === 'touchstart') e.type = 'mousedown';
            if( event.type === 'touchend') e.type = 'mouseup';
            if( event.type === 'touchmove') e.type = 'mousemove';

        }
        
        
        /*
        if( event.type === 'touchstart'){ e.type = 'mousedown'; R.findID( e ); }
        if( event.type === 'touchend'){ e.type = 'mouseup';  if( R.ID !== null ) R.ID.handleEvent( e ); R.clearOldID(); }
        if( event.type === 'touchmove'){ e.type = 'mousemove';  }
        */


        if( e.type === 'mousedown' ) R.lock = true;
        if( e.type === 'mouseup' ) R.lock = false;

        if( R.isMobile && e.type === 'mousedown' ) R.findID( e );
        if( e.type === 'mousemove' && !R.lock ) R.findID( e );
        

        if( R.ID !== null ){

            if( R.ID.isCanvasOnly ) {

                e.clientX = R.ID.mouse.x;
                e.clientY = R.ID.mouse.y;

            }

            R.ID.handleEvent( e );

        }

        if( R.isMobile && e.type === 'mouseup' ) R.clearOldID();

    }
845860
def mouseReleaseEvent( self, event ):
        
        event.setAccepted(False)
        if self._hotspotPressed:
            event.accept()
            self._hotspotPressed = False
            return
        
        # ignore events when the scene is in view mode
        scene = self.scene()
        if ( self.isLocked() or self._ignoreMouseEvents or \
             (scene and (scene.inViewMode() or scene.isConnecting()))):
            event.ignore()
            self._ignoreMouseEvents = False
            return
        
        super(XNode, self).mouseReleaseEvent(event)
        
        # emit the geometry changed signal
        self.emitGeometryChanged()
        
        # unblock the selection signals
        if ( scene ):
            scene.blockSelectionSignals(False)
            
            delta = datetime.datetime.now() - self._pressTime
            if not scene.signalsBlocked() and delta.seconds < 1:
                scene.nodeClicked.emit(self)
849638
function phantomTouchEnd(e) {
    if (e.synthetic) return;

    mouseIsDown = false;

    e.preventDefault();
    e.stopPropagation();

    fireTouchEvents('touchend', e);

    fingers.forEach(function(finger) {
      if (!finger.target) return;

      // Mobile Safari moves all the mouse event to fire after the touchend event.
      finger.target.dispatchEvent(createMouseEvent('mouseover', e, finger));
      finger.target.dispatchEvent(createMouseEvent('mousemove', e, finger));
      finger.target.dispatchEvent(createMouseEvent('mousedown', e, finger));

      // TODO: These two only fire if content didn't change. How can we tell?
      finger.target.dispatchEvent(createMouseEvent('mouseup', e, finger));
      finger.target.dispatchEvent(createMouseEvent('click', e, finger));
    });
  }