nanogui: Mouse events
Subject:
Re: [nanogui] Mouse events
From:
"Greg Haerr" ####@####.####
Date:
17 Oct 2005 01:17:49 +0100
Message-Id: <148701c5d2b0$0a156ae0$6401a8c0@winXP>
> I am trying to write code to drag windows around the screen. I have
tried using MOUSE_POSITION and MOUSE_MOTION but they don't seem to do
what I need. If you drag the windows slowly it works fine but if you
move the mouse too fast the screen goes wonky.
Wonky? What exactly is that?
GrMoveWindow (event.mouse.subwid,
devices[mouse_down_window].horizontal_location,
devices[mouse_down_window].vertical_location);
The above code is handled specially by the server since you don't
programmatically unmap the window, and move it, then map it again.
This is the source of a race condition between the server moving the
window, and you're pumping more move commands down the
pipe, based on where your mouse is.
You might try manually unmap/mapping the window, or take a look
at how nanowm does this, since it already has this code working.
Regards,
Greg