GnomeCanvasGroup disappearing tricks



I have a GnomeCanvas that, when the user button presses on it, draws a
GnomeCanvasGroup with a filled rectangle on it at the location of the
click.  As the mouse drags around on the canvas, the position of that
group follows the cursor until the button is released.  At least, that's
the desired behaviour.

Instead, what I'm seeing is the rectangle draws correctly when the mouse
button is pressed, but as the rectangle moves around, it gets clipped by
its original bounds, so if you move a rectangle to the southwest, all
the remains visible is the northwest corner the intersects with its
original position.  When I shade and unshade the window with my window
manager, however, the canvas redraws with the rectangles drawn fully in
their new positions.


Conceptually, what I'm doing is:

on press event:
   create new group with rectangle
   set position to coords of click

on motion event:
   if mouse is still down
      set position of the new group to coords of click

Any ideas what's wrong here?

Thanks,
James




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