Drawing lines & Draggin widgets



Hello everybody.

I'm actually having some problems with drag & drop on a GtkLayout.

The first problem is like this:

I have GtkLayout with some vboxes inside it, every vbox has an eventbox
inside and every eventbox has a pixmap inside (that's an icon). I set the
eventbox to be draggable using gtk_drag_source_set, so then I can drag &
drop the entire vbox by just using gtk_layout_move. So everything was
working fine until I have to paint lines in the Layout using
gdk_draw_line, that works fine, and I repaint every line on the exposure
event, that works fine too, but when I drag one of the icons then all the
lines get erased (that seems ok to me) but when I drop the icon sometimes
the lines get repainted and sometimes they don't get repainted at all, so
I checked to see if the exposure event was called everytime I made a drag
and I found out that the exposure event is called "sometimes". Does
anybody knows why?

The second problem is like this:

The drag itself it's "delayed", I mean to drag one of the icons sometimes
I have to press the button wait a few less than a second and then move
the mouse to get it properly dragged, If I press the button and inmediatly
move the mouse then I don't get a drag. Does anybody knows why? I also
have a button press event connected to the icons (eventbox) but I try
deactivating it and that didn't change anything at all.


Thanks for listening.

Jose.





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