private void HandleClickAndDragToFocus()
{
Event current = Event.current;
if ((current.type == EventType.MouseDown) || (current.type == EventType.MouseDrag))
{
s_LastActiveSceneView = this;
}
else if (s_LastActiveSceneView == null)
{
s_LastActiveSceneView = this;
}
if (current.type == EventType.MouseDrag)
{
this.draggingLocked = DraggingLockedState.Dragging;
}
else if ((GUIUtility.hotControl == 0) && (this.draggingLocked == DraggingLockedState.Dragging))
{
this.draggingLocked = DraggingLockedState.LookAt;
}
if (current.type == EventType.MouseDown)
{
Tools.s_ButtonDown = current.button;
if ((current.button == 1) && (Application.platform == RuntimePlatform.OSXEditor))
{
base.Focus();
}
}
}