[Gtk-sharp-list] Fwd: Dragging Floating windows
ajselvig at gmail.com
Sun Aug 3 14:08:53 EDT 2008
Thanks for the responses, guys. After digging around the MonoDevelop
source for a while, I figured out how they go about it. It seems all
it takes is a call to
when the window is floated, then
when the mouse button is released. The MonoDoc documentation on these
methods isn't very good, but I'm assuming there's more info in the
GTK+ docs. Also, you really have to be careful to grab the correct Gdk
window, otherwise you might lose all mouse interaction and have X
Hopefully this helps others who are interested in similar functionality.
On Sun, Aug 3, 2008 at 11:05 AM, Adam Tauno Williams
<awilliam at whitemice.org> wrote:
>> I sent the e-mail below a couple weeks ago and haven't gotten any
>> response. I'm not sure if it just didn't go through or what the deal
>> is. Anyway, if anyone has any idea how to help it would be
>> appreciated, otherwise some direction as to where else to go for help
>> would be great.
> It went through, I saw it. There just wasn't a response [and your using
> gmail with besides being crap and non-standards compliant in 1,000 other
> ways also prevents you from seeing your own posts to mail lists. I
> think they consider that a feature.]
> Sorry I can't give you any advice. I haven't gotten to DnD in my own
> Gtk# application <http://code.google.com/p/consonance/> yet. Maybe in
> the next couple weeks.
>> 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.
>> Gtk-sharp-list maillist - Gtk-sharp-list at lists.ximian.com
> Gtk-sharp-list maillist - Gtk-sharp-list at lists.ximian.com
More information about the Gtk-sharp-list