@techee commented on this pull request.


In src/editor.c:

> @@ -288,6 +288,21 @@ void editor_snippets_init(void)
 }
 
 
+gboolean motion_notify_event(GtkWidget* widget, GdkEventMotion event, gpointer data)
+{
+	GeanyEditor *editor = data;
+
+	if (event.state & GDK_BUTTON1_MASK && event.state & GDK_MOD1_MASK)

keybindings_get_modifiers(event.state) filters-out GDK_BUTTON1_MASK so it cannot be used for it. What is the correct way to handle this situation?

if (event.state == (GDK_BUTTON1_MASK | GDK_MOD1_MASK))

works for me though it might break if there's some extra stuff in state, one could also use

if ((event.state & GDK_BUTTON1_MASK) && keybindings_get_modifiers(event.state) == GDK_MOD1_MASK))

but the condition might be satisfied also when there is more than GDK_BUTTON1_MASK pressed.


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <geany/geany/pull/3899/review/2125475334@github.com>