From b16623a246b2cd9baca0a5042d3b40d12362551d Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Thu, 13 Jul 2000 05:42:06 +0000 Subject: Showing selection in grey when its not the primary selection on GTK+. --- gtk/ScintillaGTK.cxx | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'gtk') diff --git a/gtk/ScintillaGTK.cxx b/gtk/ScintillaGTK.cxx index a0cafa93a..8fbc58a10 100644 --- a/gtk/ScintillaGTK.cxx +++ b/gtk/ScintillaGTK.cxx @@ -556,6 +556,7 @@ void ScintillaGTK::ClaimSelection() { // X Windows has a 'primary selection' as well as the clipboard. // Whenever the user selects some text, we become the primary selection if (currentPos != anchor) { + primarySelection = true; gtk_selection_owner_set(GTK_WIDGET(wDraw.GetID()), GDK_SELECTION_PRIMARY, GDK_CURRENT_TIME); delete []primarySelectionCopy; @@ -563,9 +564,11 @@ void ScintillaGTK::ClaimSelection() { } else if (OwnPrimarySelection()) { if (primarySelectionCopy == NULL) gtk_selection_owner_set(NULL, GDK_SELECTION_PRIMARY, GDK_CURRENT_TIME); + primarySelection = true; } else { delete []primarySelectionCopy; primarySelectionCopy = NULL; + primarySelection = false; } } @@ -659,6 +662,8 @@ void ScintillaGTK::UnclaimSelection(GdkEventSelection *selection_event) { if (selection_event->selection == GDK_SELECTION_PRIMARY) { delete [] primarySelectionCopy; primarySelectionCopy = NULL; + primarySelection = false; + FullPaint(); } } -- cgit v1.2.3