[gtk+] textbuffer: Do not unset selection if failing to update the primary selection
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] textbuffer: Do not unset selection if failing to update the primary selection
- Date: Wed, 2 Jul 2014 16:57:29 +0000 (UTC)
commit 67efefde499d683707050d456846c98527df0ac4
Author: Carlos Garnacho <carlosg gnome org>
Date: Wed Jul 2 15:28:45 2014 +0200
textbuffer: Do not unset selection if failing to update the primary selection
This is expected to happen on wayland and other platforms with no primary selection,
and just leads to the selected text being cleared after any attempt to change the
text selection itself through either mouse/keyboard.
gtk/gtktextbuffer.c | 13 ++++++-------
1 files changed, 6 insertions(+), 7 deletions(-)
---
diff --git a/gtk/gtktextbuffer.c b/gtk/gtktextbuffer.c
index 6a03b55..10d41d4 100644
--- a/gtk/gtktextbuffer.c
+++ b/gtk/gtktextbuffer.c
@@ -3656,13 +3656,12 @@ update_selection_clipboards (GtkTextBuffer *buffer)
/* Even if we already have the selection, we need to update our
* timestamp.
*/
- if (!gtk_clipboard_set_with_owner (clipboard,
- priv->copy_target_entries,
- priv->n_copy_target_entries,
- clipboard_get_selection_cb,
- clipboard_clear_selection_cb,
- G_OBJECT (buffer)))
- clipboard_clear_selection_cb (clipboard, buffer);
+ gtk_clipboard_set_with_owner (clipboard,
+ priv->copy_target_entries,
+ priv->n_copy_target_entries,
+ clipboard_get_selection_cb,
+ clipboard_clear_selection_cb,
+ G_OBJECT (buffer));
}
tmp_list = tmp_list->next;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]