diff options
| author | nyamatongwe <devnull@localhost> | 2000-07-13 05:42:06 +0000 |
|---|---|---|
| committer | nyamatongwe <devnull@localhost> | 2000-07-13 05:42:06 +0000 |
| commit | b16623a246b2cd9baca0a5042d3b40d12362551d (patch) | |
| tree | a6ad72e62cf597851024a6de6db45d5d05e5f172 /gtk | |
| parent | c3513b02107e9dcd65c39bd540804fa9db5d0bf0 (diff) | |
| download | scintilla-mirror-b16623a246b2cd9baca0a5042d3b40d12362551d.tar.gz | |
Showing selection in grey when its not the primary selection on GTK+.
Diffstat (limited to 'gtk')
| -rw-r--r-- | gtk/ScintillaGTK.cxx | 5 |
1 files changed, 5 insertions, 0 deletions
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(); } } |
