[AD] position_mouse() documentation addendum |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
- To: alleg-developers@xxxxxxxxxx
- Subject: [AD] position_mouse() documentation addendum
- From: "Tore Halse" <gnolam@xxxxxxxxxx>
- Date: Fri, 14 Apr 2006 15:45:11 +0200
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type; b=YC/4yXdiffqzEnOyzyxCcnYHw1UbbtYyEI0eXMg4yLgtowak2/ijSOr7EwAhJ/D+sPbHSJD+0ZlO669sCra4wzpy3IJVYhUWgiWfYQjl78yBm3dJjoclxlVp9hXzpRIc4RzjzRy52fmIugmqVtMR5jQ9Rkv2WwwrLHQtqvjLLoo=
Attached is a documentation update noting a peculiarity of
position_mouse()'s behavior under Windows. The section on how to work
around it could probably do with a rewrite, but it's better than
nothing at least.
Cheers
Tore
--
Feed me a stray cat.
--- allegro._tx.old Fri Apr 14 15:39:27 2006
+++ allegro._tx Fri Apr 14 15:41:50 2006
@@ -2946,9 +2946,18 @@
@@void @position_mouse(int x, int y);
@xref install_mouse, position_mouse_z, set_mouse_range, set_mouse_speed
+@xref set_display_switch_mode, set_display_switch_callback
@shortdesc Moves the mouse to the specified screen position.
Moves the mouse to the specified screen position. It is safe to call even
when a mouse pointer is being displayed.
+
+ Note: under Windows, this will reposition the global mouse cursor even if
+ the application does not currently have focus. This could prohibit the user
+ from using the mouse when your program is running in the background. It is
+ therefore a good idea to either pause your program when it's inactive using
+ set_display_switch_mode(), or to only call position_mouse() when it's active
+ (e.g. by setting a flag with set_display_switch_callback() telling you if
+ your program currently has focus or not).
@@void @position_mouse_z(int z);
@xref install_mouse, position_mouse