The Gemini - 2008-01-15

I just found something which could be a bug, or lets say unmeant functionality.

From what I understand the MouseWarp feature, it will only switch, when the mouse is at the border for more than "Minimum Duration" (from the settings). With the latest CVS files (from 2008-01-14) the behavior is different. It switches anyway, even when the mouse was moved away . This makes the "Minimum Duration" needless, which is most likely not wanted that way.

In the file MouseWarp.cpp I found a line which is causing it:
      //Notify application if warp location has changed, or if it has not changed for some time
      if (newWarpLoc != warpLoc || duration > self->m_reWarpDelay)
         duration = 0;
         warpLoc = newWarpLoc;
     if (warpLoc != WARP_NONE)
       PostMessage(vdWindow, WM_VD_MOUSEWARP, 0, warpLoc);

         if (self->m_invertMousePos)

When you remove the if from "if (warpLoc != WARP_NONE) PostMessage(vdWindow, WM_VD_MOUSEWARP, 0, warpLoc);" it works. (Do the PostMessage always; no if-statement)
The OnMouseWarp function is the only place in the code that interrupts a desktop change and does so by checking if the parameter is equal to WARP_NONE. So it makes no sense to only post the message when warpLoc != WARP_NONE.

By the way: I realized that the CVS version has a invert-mouse feature. In my point of view it is not implemented nicely. The mouse is inverted immediately when it is at the border. It should be inverted when the desk was changed, not before. In the help forum I have posted a file some time ago to do that.

It strikes me, that the problems with the Minimum Duration may be related to the mouse invert. If the mouse invert from the latest CVS version is activated it makes sense to do not post the message if warpPos is WARP_NONE, because the mouse is already away from the border, but virtually on the next screen.
But when the mouse invert is disabled the PostMessage should be done without the if-statement.