emit signal to window
<p>I have the following code fragments:</p>

<pre><code>win = new Gtk::Window;
m_canvas = new Goocanvas::Canvas;

sigc::connection conn_t1 = m_canvas-&gt;signal_event().connect( sigc::ptr_fun( &amp;AnyEvent));

sigc::connection conn_t2 = win-&gt;signal_event().connect( sigc::ptr_fun( &amp;WinHandler));
</code></pre>

<p>Now I also register an IdleHandler which generates signals:</p>

<pre><code>Glib::signal_idle().connect( sigc::mem_fun( *this, &amp;IdleSendEvent::Do));
</code></pre>

<p>What I want to achieve:
The handler of the canvas should receive an event and should generate a new one and this one should send to the object, so that it will call again the handler of the m_canvas->signal_event().</p>

<p>In other words: Indirectly via the Idle Handler the signal should be send to the sending object itself.</p>

<p>But if I fire to </p>

<pre><code>g_signal_emit_by_name (m_canvas-&gt;gobj(), "button-press-event", event, &amp;return_val);
</code></pre>

<p>the signal is not received in the canvas itself, but in some child objects there.</p>

<p>Q: How to emmit again to the canvas? Is there something like "get_the_parent_signal_object_handler_father_receiver" or something strange?</p>

<p>I did a lot of gtk_widget_get_parent_window() but all results in runtime errors like:</p>

<blockquote>
  <p>(go:15430): GLib-GObject-WARNING **: gsignal.c:3484: signal name 'button-press-event' is invalid for instance '0x9afbc48' of type 'GdkX11Window'</p>
</blockquote>

<p>I simply have no idea where to find the correct instance which I have to emmit a signal which is then received for the canvas. It looks that the instance for <code>g_signal_emit_by_name</code> fires not to the object itself but all child instances. I can not find a documentation how the signals are processed and how the hierarchy can be walked through. One of the problems is that gtk+ and gtkmm are related but the documentation totally unclear and scattered.</p>