[gnome-applets/gnome-3-24] sticky-notes: fix text selection



commit 5998eaaaeedca1a267b23ce4db208bea4cb045ba
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date:   Sun Jul 23 00:15:38 2017 +0300

    sticky-notes: fix text selection
    
    GTK+ 3.14 added gesture support for many widgets, including the
    GtkTextView. The button press event handler was removed meaning that
    there is nothing that would stop event propagation to GtkWindow.
    
    Stop button press event propagation to GtkWindow from GtkTextView
    as we don't want to start moving note when trying to select text.

 sticky-notes/src/stickynotes.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/sticky-notes/src/stickynotes.c b/sticky-notes/src/stickynotes.c
index 43952e2..cef69d0 100644
--- a/sticky-notes/src/stickynotes.c
+++ b/sticky-notes/src/stickynotes.c
@@ -307,6 +307,9 @@ stickynote_new_aux (GdkScreen *screen, gint x, gint y, gint w, gint h)
 
        g_object_unref(builder);
 
+       g_signal_connect_after (note->w_body, "button-press-event",
+                               G_CALLBACK (gtk_true), note);
+
        g_signal_connect (gtk_text_view_get_buffer(GTK_TEXT_VIEW(note->w_body)),
                          "changed",
                          G_CALLBACK (buffer_changed), note);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]