From ebf4f7355aa8bd24a81554b49c22b7d9f44503b0 Mon Sep 17 00:00:00 2001 From: yangxx Date: Tue, 10 Feb 2004 19:19:32 +0000 Subject: [PATCH] Handler for grab-focus signal git-svn-id: http://ltt.polymtl.ca/svn@488 04897980-b3bd-0310-b5e0-8ef037075253 --- ltt/branches/poly/lttv/modules/gui/controlflow/cfv.c | 12 ++++++++++++ .../poly/lttv/modules/gui/controlflow/drawing.c | 2 ++ 2 files changed, 14 insertions(+) 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; } -- 2.34.1