Re: Canvas wedging on request_update()

On Fri, 24 Sep 1999, Federico Mena Quintero wrote:

> If you have a Pad object, you could make it emit a signal when it gets
> moved by its event handler.  Then the wires would catch that signal
> and move themselves.
AFAICT, that's equivalent to what I was already doing.  The difference
between calling request_update() in the pad's handler and calling it
directly from the pad's update() method seems to just be a bunch of
marshalling and demarshalling.

I did get it to work somewhat by setting up the motion_notify event
handler to call request_update on the object's container and all the wires
associated with it.  I can now drag objects around inside the container
and the wires go with them.

However, I've just moved the problem up a level.  Once I've created wires
inside the bin, I end up wedged the exact same way when trying to move the
container itself around.

As I think about it some, it seems that I might be able to relatively
easily re-arrange the hierarchy to not be built around the canvas, but
rather to container the canvas items.  Just add a *group var into each
struct of the Group-derived classes, and rearrange to use that when
referring to the group, rather than the *selfgroup pointer I'm casting.

Not sure how precisely that will help the present situation, though.  I've
still got request_update()s happening in marginal places, though AFAICT
I've removed all those instances and I'm still wedging.

I should note that the resulting canvas display is rather blatantly wrong,
making me think that there's some particular invalid state in the Group
class that's not being caught and flagged as an error.  Not that I can
pinpoint where that is...  If I can, I'll see if I can post a patch.


         Erik Walthinsen <> - Staff Programmer @ OGI
        Quasar project -
   Video4Linux Two drivers and stuff -
       /  \             SEUL: Simple End-User Linux -
      |    | M E G A           Helping Linux become THE choice
      _\  /_                          for the home or office user

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]