diff options
| author | Neil <nyamatongwe@gmail.com> | 2019-04-11 16:05:01 +1000 |
|---|---|---|
| committer | Neil <nyamatongwe@gmail.com> | 2019-04-11 16:05:01 +1000 |
| commit | e536b61148c007c306bdedbea55000f8eb152884 (patch) | |
| tree | b214afba5241f1f4f29f3f06c545e9bdba1903e8 /gtk/ScintillaGTK.h | |
| parent | 18b0e610929260475c81baab1c0a52d88f5dc11a (diff) | |
| download | scintilla-mirror-e536b61148c007c306bdedbea55000f8eb152884.tar.gz | |
Bug [#2087]. Fix flickering when inserting primary selection on GTK between
SciTE tabs.
This does not allow primary selection to work between tabs as the tabs are
sharing a single Scintilla and the old primary selection is unclaimed when the
file is changed.
This fix adds a new ReceivedClipboard method which does not try to convert the
selection if received in a different format than asked for. It was the call to
gtk_selection_convert that seemed to cause the flickering. ReceivedClipboard is
only called from SelectionReceiver::ClipboardReceived so only occurs due to a
call to RequestSelection and can not occur because of a selection_received
signal.
ReceivedSelection is left with its complexity in case it is needed for some
other issue although it doesn't appear to be called for drag&drop, for example.
Diffstat (limited to 'gtk/ScintillaGTK.h')
| -rw-r--r-- | gtk/ScintillaGTK.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gtk/ScintillaGTK.h b/gtk/ScintillaGTK.h index 27f900455..b87808824 100644 --- a/gtk/ScintillaGTK.h +++ b/gtk/ScintillaGTK.h @@ -133,10 +133,12 @@ private: bool OwnPrimarySelection(); void ClaimSelection() override; void GetGtkSelectionText(GtkSelectionData *selectionData, SelectionText &selText); + void InsertSelection(GtkSelectionData *selectionData); public: // Public for SelectionReceiver GObject *MainObject() const noexcept; - void ReceivedSelection(GtkSelectionData *selection_data); + void ReceivedClipboard(GtkSelectionData *selection_data) noexcept; private: + void ReceivedSelection(GtkSelectionData *selection_data); void ReceivedDrop(GtkSelectionData *selection_data); static void GetSelection(GtkSelectionData *selection_data, guint info, SelectionText *text); void StoreOnClipboard(SelectionText *clipText); |
