aboutsummaryrefslogtreecommitdiffhomepage
path: root/gtk/ScintillaGTK.cxx
diff options
context:
space:
mode:
authornyamatongwe <devnull@localhost>2000-07-15 07:39:02 +0000
committernyamatongwe <devnull@localhost>2000-07-15 07:39:02 +0000
commit0fcb749581b4806a6dba56eb7edb6ceb961ab08e (patch)
tree82c3a4e690d961ad4fc9d74a8ca09dc44f925d4e /gtk/ScintillaGTK.cxx
parent08f5c4507d2249b41be1e5f58db204868d1a73b3 (diff)
downloadscintilla-mirror-0fcb749581b4806a6dba56eb7edb6ceb961ab08e.tar.gz
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.
Diffstat (limited to 'gtk/ScintillaGTK.cxx')
-rw-r--r--gtk/ScintillaGTK.cxx7
1 files changed, 6 insertions, 1 deletions
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);