[gnome-applets] sticky-notes: fix text selection



commit e189ba213c0f8db876dd020d1d80b9f8b576dd75
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 9d32ec9..0899018 100644
--- a/sticky-notes/src/stickynotes.c
+++ b/sticky-notes/src/stickynotes.c
@@ -306,6 +306,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]