[geany/geany] ed2cf2: VTE: Grab focus upon middle click

Colomban Wendling git-noreply at geany.org
Tue Dec 4 20:52:05 UTC 2012


Branch:      refs/heads/master
Author:      Colomban Wendling <ban at herbesfolles.org>
Committer:   Colomban Wendling <ban at herbesfolles.org>
Date:        Tue, 04 Dec 2012 20:52:05 UTC
Commit:      ed2cf2e5f423eb484400637a54b58c9876b88b0a
             https://github.com/geany/geany/commit/ed2cf2e5f423eb484400637a54b58c9876b88b0a

Log Message:
-----------
VTE: Grab focus upon middle click

When pasting with the X primary clipboard (middle mouse button), the
user expects the focus to be grabbed by the widget receiving the data.

No idea why the VTE itself don't grab upon middle click, though.


Modified Paths:
--------------
    src/vte.c

Modified: src/vte.c
4 files changed, 4 insertions(+), 0 deletions(-)
===================================================================
@@ -399,6 +399,10 @@ static gboolean vte_button_pressed(GtkWidget *widget, GdkEventButton *event, gpo
 		gtk_widget_grab_focus(vc->vte);
 		gtk_menu_popup(GTK_MENU(vc->menu), NULL, NULL, NULL, NULL, event->button, event->time);
 	}
+	else if (event->button == 2)
+	{
+		gtk_widget_grab_focus(widget);
+	}
 	return FALSE;
 }
 



--------------
This E-Mail was brought to you by github_commit_mail.py (Source: TBD).


More information about the Commits mailing list