[gtk+] entry: 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+] entry: Do not unset selection if failing to update the primary selection
- Date: Wed, 2 Jul 2014 16:57:34 +0000 (UTC)
commit 5fe9ebfe11002c870ebf6a12d3936990ed1aedfa
Author: Carlos Garnacho <carlosg gnome org>
Date: Wed Jul 2 15:35:07 2014 +0200
entry: 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/gtkentry.c | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/gtk/gtkentry.c b/gtk/gtkentry.c
index d77c50f..abaa20b 100644
--- a/gtk/gtkentry.c
+++ b/gtk/gtkentry.c
@@ -7332,9 +7332,8 @@ gtk_entry_update_primary_selection (GtkEntry *entry)
if (gtk_editable_get_selection_bounds (GTK_EDITABLE (entry), &start, &end))
{
- if (!gtk_clipboard_set_with_owner (clipboard, targets, n_targets,
- primary_get_cb, primary_clear_cb, G_OBJECT (entry)))
- primary_clear_cb (clipboard, entry);
+ gtk_clipboard_set_with_owner (clipboard, targets, n_targets,
+ primary_get_cb, primary_clear_cb, G_OBJECT (entry));
}
else
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]