|
|
22448f |
From 85c201a37211ac3251673a10ed504e789bb0db60 Mon Sep 17 00:00:00 2001
|
|
|
22448f |
From: Marek Kasik <mkasik@redhat.com>
|
|
|
22448f |
Date: Tue, 23 Feb 2016 12:02:29 +0100
|
|
|
22448f |
Subject: [PATCH] Give focus to new RDP tab
|
|
|
22448f |
|
|
|
22448f |
Previously RDP tab didn't get focus once it was created
|
|
|
22448f |
and hence typing did not work initially.
|
|
|
22448f |
RDP tab is a focusable widget now and grabs focus once
|
|
|
22448f |
it is realized.
|
|
|
22448f |
|
|
|
22448f |
https://bugzilla.gnome.org/show_bug.cgi?id=752957
|
|
|
22448f |
---
|
|
|
22448f |
plugins/rdp/vinagre-rdp-tab.c | 11 +++++++++++
|
|
|
22448f |
1 file changed, 11 insertions(+)
|
|
|
22448f |
|
|
|
22448f |
diff --git a/plugins/rdp/vinagre-rdp-tab.c b/plugins/rdp/vinagre-rdp-tab.c
|
|
|
22448f |
index 39b18a7..0facea4 100644
|
|
|
22448f |
--- a/plugins/rdp/vinagre-rdp-tab.c
|
|
|
22448f |
+++ b/plugins/rdp/vinagre-rdp-tab.c
|
|
|
22448f |
@@ -1221,11 +1221,21 @@ open_freerdp (VinagreRdpTab *rdp_tab)
|
|
|
22448f |
}
|
|
|
22448f |
|
|
|
22448f |
static void
|
|
|
22448f |
+tab_realized (GtkWidget *widget,
|
|
|
22448f |
+ gpointer user_data)
|
|
|
22448f |
+{
|
|
|
22448f |
+ gtk_widget_grab_focus (widget);
|
|
|
22448f |
+ g_signal_handlers_disconnect_by_func (widget, tab_realized, user_data);
|
|
|
22448f |
+}
|
|
|
22448f |
+
|
|
|
22448f |
+static void
|
|
|
22448f |
vinagre_rdp_tab_init (VinagreRdpTab *rdp_tab)
|
|
|
22448f |
{
|
|
|
22448f |
rdp_tab->priv = VINAGRE_RDP_TAB_GET_PRIVATE (rdp_tab);
|
|
|
22448f |
|
|
|
22448f |
rdp_tab->priv->connected_actions = create_connected_actions (rdp_tab);
|
|
|
22448f |
+
|
|
|
22448f |
+ g_signal_connect (rdp_tab, "realize", G_CALLBACK (tab_realized), NULL);
|
|
|
22448f |
}
|
|
|
22448f |
|
|
|
22448f |
GtkWidget *
|
|
|
22448f |
@@ -1235,6 +1245,7 @@ vinagre_rdp_tab_new (VinagreConnection *conn,
|
|
|
22448f |
return GTK_WIDGET (g_object_new (VINAGRE_TYPE_RDP_TAB,
|
|
|
22448f |
"conn", conn,
|
|
|
22448f |
"window", window,
|
|
|
22448f |
+ "can-focus", TRUE,
|
|
|
22448f |
NULL));
|
|
|
22448f |
}
|
|
|
22448f |
|
|
|
22448f |
--
|
|
|
22448f |
2.5.0
|
|
|
22448f |
|