Re: Movinf the mouse pointer



Valdis Kletnieks vt edu wrote:

On Mon, 13 Jun 2005 14:38:27 +0200, Luca Cappa said:

My problem is that I would like to reset the mouse pointer position after each delta movement has been detected: in this way the mouse pointer is always placed in the original position it was when the mouse button was pressed.

Please note that most UI design guides rate "warping the mouse pointer" as a
fairly anti-social thing to do, because it confuses users who expect the mouse
pointer to be where they left it.  If their next action is taken thinking that
the mouse pointer is *here*, when it's actually jsut been moved back 150 pixels
to where it *was*, Very Strange Things can happen (for instance, the *next*
drag-n-(drop,select,zoom,ec) isn't what the user intended, and so on).

Even most "rotate the view" applications leave the mouse where it at the
end of the rotate - otherwise Odd Things can happen.  Consider:

1) User starts at 1,0,0 (out on the X axis).
2) User rotates the model 90 degrees with a drag to 0,1,0 (out the Y axis)

3a) Mouse left where it was: User rotates the model with an "up" to 0,1,1 - this causes a rotate around X.

3b) Mouse warped back to 1,0,0 and user doesn't notice, does the *same* "up",
and now the model rotates around the Y axis instead of X.

It violates the "principle of least surprise" that if they had done one continuous
drag from (1) to (2) to (3), it rotates one way, but if they break it into two
pieces it does a different rotate....

Just something to think about as you design....
Yes, I agree with you.  In my problem i exposed I said also that
"When this process is going on, the mouse is hidden (i.e. its shape is an empty image). " so the user would not notice that the mouse is being reset (moved) many times, and when the rotating of the 3D view ends (i.e. left mouse button released) the mouse pop up again in the original position it was when it was hidden (i.e. left mouse button held down).

Ii just need a function like some one suggested already to me as:

int XWarpPointer(Display *display, Window src_w, Window dest_w, int

             src_x, int src_y, unsigned int src_width, unsigned int
             src_height, int dest_x, int dest_y);

which still I have to understand how it works :-)

Greetings,
Luca






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