summaryrefslogtreecommitdiffstats
path: root/usr.sbin/moused
diff options
context:
space:
mode:
authorsos <sos@FreeBSD.org>1996-06-25 08:54:57 +0000
committersos <sos@FreeBSD.org>1996-06-25 08:54:57 +0000
commit860f339c7232c8702024ec047064a929d031fad9 (patch)
treedd12dfd5ac0541ec9f731ed617993c246946cbd3 /usr.sbin/moused
parentd289477c1ff270a17b871d260683b361ff39f066 (diff)
downloadFreeBSD-src-860f339c7232c8702024ec047064a929d031fad9.zip
FreeBSD-src-860f339c7232c8702024ec047064a929d031fad9.tar.gz
Change the way moused talk to syscons, now its only delivering mouseevents
via an ioctl (MOUSE_ACTION). Fixed a couple of bugs (destructive cursor, uncut, jitter). Now applications can use the mouse via the MOUSE_MODE ioctl, its possible to have a signal sent on mouseevents, makeing an event loop in the application take over mouseevents.
Diffstat (limited to 'usr.sbin/moused')
-rw-r--r--usr.sbin/moused/moused.c24
1 files changed, 5 insertions, 19 deletions
diff --git a/usr.sbin/moused/moused.c b/usr.sbin/moused/moused.c
index 342182c..485451c 100644
--- a/usr.sbin/moused/moused.c
+++ b/usr.sbin/moused/moused.c
@@ -30,7 +30,7 @@
** EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
**
**
- ** $Id$
+ ** $Id: moused.c,v 1.1 1996/06/21 09:24:09 sos Exp $
**/
/**
@@ -246,24 +246,10 @@ main(int argc, char *argv[])
act = r_protocol(b); /* pass byte to handler */
if (act) /* handler detected action */
{
- if (act->buttons != saved_buttons) {
- if (act->buttons == 0x04) {
- mouse.operation = MOUSE_CUT_START;
- ioctl(cfd, CONS_MOUSECTL, &mouse);
- }
- if (act->buttons == 0x00) {
- mouse.operation = MOUSE_CUT_END;
- ioctl(cfd, CONS_MOUSECTL, &mouse);
- }
- if (act->buttons == 0x01) {
- mouse.operation = MOUSE_RETURN_CUTBUFFER;
- ioctl(cfd, CONS_MOUSECTL, &mouse);
- }
- saved_buttons = act->buttons;
- }
- mouse.operation = MOUSE_MOVEREL;
- mouse.x = act->dx;
- mouse.y = act->dy;
+ mouse.operation = MOUSE_ACTION;
+ mouse.u.data.x = act->dx;
+ mouse.u.data.y = act->dy;
+ mouse.u.data.buttons = act->buttons;
ioctl(cfd, CONS_MOUSECTL, &mouse);
debug("Activity : buttons 0x%02x dx %d dy %d",
act->buttons,act->dx,act->dy);
OpenPOWER on IntegriCloud