On Tue, Aug 17, 2010 at 1:51 AM, Dov Grobgeld <
dov grobgeld gmail com> wrote:
> While playing around with a general system for doing polygon overlays (e.g.
> for rectangle or line selection) I got stuck on the following problem.
>
> Assume that I have a widget A that has an expose handler exp_A().
>
> Now assume that I would temporarily like to draw an "overlay on A" from the
> code in expose handler exp_B(). I.e. after exp_A() has finished its work,
> exp_B() should be called.
>
> I am in control of exp_B() but cannot touch exp_A().
>
> I trigger the calling of expose events by calling
> gdk_window_invalidate_rect() from update_B().
>
> The problem is as follows:
>
> If I do g_signal_connect_after(widget, "expose-event", exp_B, me) then I set
> up the correct order of exposure through A and B, but if exp_A() does
> "return TRUE", then exp_B() will not be called.
> If I do g_signal_connect(widget, "expose-event", exp_B, me) then exp_B()
> will always be called, but in the wrong order.
>
> So how is can this be solved?
>
> If I do g_signal_connect(), can exp_B() e.g. block itself as a signal
> handler and rethrow() the signal to the other handlers and then return? How
> is this done?
>
> Thanks!
> Dov
>
>
>
>