From fbc8d3a114b6fdf12dfe6f56e3893f935dcb74c3 Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Sat, 15 Jul 2000 07:39:02 +0000 Subject: Fixed problem with CancelModes killing drag and drop by setting empty selection. On GTK+ double click GTK+ events are ignored as this led to prblems in primary selection code. --- gtk/ScintillaGTK.cxx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'gtk') diff --git a/gtk/ScintillaGTK.cxx b/gtk/ScintillaGTK.cxx index 8fbc58a10..675962e1d 100644 --- a/gtk/ScintillaGTK.cxx +++ b/gtk/ScintillaGTK.cxx @@ -659,7 +659,8 @@ void ScintillaGTK::GetSelection(GtkSelectionData *selection_data, guint info, ch } void ScintillaGTK::UnclaimSelection(GdkEventSelection *selection_event) { - if (selection_event->selection == GDK_SELECTION_PRIMARY) { + if ((selection_event->selection == GDK_SELECTION_PRIMARY) && + !OwnPrimarySelection()) { delete [] primarySelectionCopy; primarySelectionCopy = NULL; primarySelection = false; @@ -718,6 +719,10 @@ gint ScintillaGTK::MoveResize(GtkWidget *, GtkAllocation *allocation, ScintillaG gint ScintillaGTK::Press(GtkWidget *, GdkEventButton *event, ScintillaGTK *sciThis) { //Platform::DebugPrintf("Press %x time=%d state = %x button = %x\n",sciThis,event->time, event->state, event->button); + // Do not use GTK+ double click events as Scintilla has its own double click detection + if (event->type != GDK_BUTTON_PRESS) + return FALSE; + sciThis->evbtn = *event; Point pt; pt.x = int(event->x); -- cgit v1.2.3