#if wxUSE_HTML && wxUSE_STREAMS
-#ifndef WXPRECOMP
+#ifndef WX_PRECOMP
#include "wx/list.h"
#include "wx/log.h"
#include "wx/intl.h"
void wxHtmlWindow::OnLinkClicked(const wxHtmlLinkInfo& link)
{
wxHtmlLinkEvent event(GetId(), link);
+ event.SetEventObject(this);
if (!GetEventHandler()->ProcessEvent(event))
{
// the default behaviour is to load the URL in this window
ReleaseMouse();
m_makingSelection = false;
- // did the user move the mouse far enough from starting point?
- if ( CopySelection(Primary) )
+ // if m_selection=NULL, the user didn't move the mouse far enough from
+ // starting point and the mouse up event is part of a click, the user
+ // is not selecting text:
+ if ( m_selection )
{
+ CopySelection(Primary);
+
// we don't want mouse up event that ended selecting to be
// handled as mouse click and e.g. follow hyperlink:
return;