[Gtk-sharp-list] Dragging Floating windows

Andy Selvig ajselvig at gmail.com
Wed Jul 23 08:54:58 EDT 2008

Hello All-

I'm having some trouble with dragging a floating, decoration-less
window around the screen. I have written a small (tried to keep it
under 100 lines but failed) app that demonstrates the problem.

The main window simply contains a button. When the user clicks on the
button, the button reparents itself to a floating window and the user
can then drag the window around the screen. The problem is that, after
the user clicks the button but BEFORE they let go of the mouse button,
the dragging doesn't seem to behave quite right. If the mouse is moved
slowly enough, it works fine, but at a certain speed the floating
window will stop tracking it. The strange thing is that if the user
lets go and clicks on the button again, the dragging will work
perfectly, no matter what the speed. It basically just doesn't seem to
be receiving the mouse events properly after the reparent.

I tried looking through the C source for HandleBox, but couldn't find
what makes it not behave this way. My source code is attached. Any
help would be greatly appreciated.


-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: FloatDraggingTest.cs
Url: http://lists.ximian.com/pipermail/gtk-sharp-list/attachments/20080723/f4f0fc08/attachment-0001.pl 

More information about the Gtk-sharp-list mailing list