From: yangxx Date: Tue, 10 Feb 2004 19:19:32 +0000 (+0000) Subject: Handler for grab-focus signal X-Git-Tag: v0.12.20~3001 X-Git-Url: http://git.lttng.org/?a=commitdiff_plain;h=ebf4f7355aa8bd24a81554b49c22b7d9f44503b0;p=lttv.git Handler for grab-focus signal git-svn-id: http://ltt.polymtl.ca/svn@488 04897980-b3bd-0310-b5e0-8ef037075253 --- diff --git a/ltt/branches/poly/lttv/modules/gui/controlflow/cfv.c b/ltt/branches/poly/lttv/modules/gui/controlflow/cfv.c index 8f35404e..bf444b65 100644 --- a/ltt/branches/poly/lttv/modules/gui/controlflow/cfv.c +++ b/ltt/branches/poly/lttv/modules/gui/controlflow/cfv.c @@ -32,6 +32,13 @@ extern GSList *g_control_flow_data_list; +static void control_flow_grab_focus(GtkWidget *widget, gpointer data){ + ControlFlowData * control_flow_data = (ControlFlowData *)data; + MainWindow * mw = control_flow_data->mw; + set_focused_pane(mw, gtk_widget_get_parent(control_flow_data->scrolled_window)); +} + + /***************************************************************************** * Control Flow Viewer class implementation * *****************************************************************************/ @@ -126,6 +133,11 @@ guicontrolflow(void) //can be configured (and this must happend bedore sending //data) + g_signal_connect (G_OBJECT (process_list_widget), "grab-focus", + G_CALLBACK (control_flow_grab_focus), + control_flow_data); + + return control_flow_data; } diff --git a/ltt/branches/poly/lttv/modules/gui/controlflow/drawing.c b/ltt/branches/poly/lttv/modules/gui/controlflow/drawing.c index 2a435013..e8b28a98 100644 --- a/ltt/branches/poly/lttv/modules/gui/controlflow/drawing.c +++ b/ltt/branches/poly/lttv/modules/gui/controlflow/drawing.c @@ -386,6 +386,8 @@ button_press_event( GtkWidget *widget, GdkEventButton *event, gpointer user_data set_current_time(control_flow_data->mw, &time); } + + set_focused_pane(control_flow_data->mw, gtk_widget_get_parent(control_flow_data->scrolled_window)); return FALSE; }