diff options
| author | jmmv <jmmv@NetBSD.org> | 2004-01-05 11:17:14 +0000 |
|---|---|---|
| committer | jmmv <jmmv@NetBSD.org> | 2004-01-05 11:17:14 +0000 |
| commit | 033feda138bcb3fac85a6de2cb1fc849e7319210 (patch) | |
| tree | 478f81c79a5669f443d7502d8863699900e81c9c /usr.sbin | |
| parent | 9be8f275ce701fb7871b6c950ebd3e4a0b07e5d4 (diff) | |
Fix xconsole handling (enable the mouse properly when returning from X).
Closes PR bin/23223 by FUKAUMI Naoki.
Diffstat (limited to 'usr.sbin')
| -rw-r--r-- | usr.sbin/wsmoused/selection.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/usr.sbin/wsmoused/selection.c b/usr.sbin/wsmoused/selection.c index 058ca0f2745..b9dd4633270 100644 --- a/usr.sbin/wsmoused/selection.c +++ b/usr.sbin/wsmoused/selection.c @@ -1,7 +1,7 @@ -/* $NetBSD: selection.c,v 1.5 2003/08/06 23:58:40 jmmv Exp $ */ +/* $NetBSD: selection.c,v 1.6 2004/01/05 11:17:14 jmmv Exp $ */ /* - * Copyright (c) 2002, 2003 The NetBSD Foundation, Inc. + * Copyright (c) 2002, 2003, 2004 The NetBSD Foundation, Inc. * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation @@ -32,7 +32,7 @@ #include <sys/cdefs.h> #ifndef lint -__RCSID("$NetBSD: selection.c,v 1.5 2003/08/06 23:58:40 jmmv Exp $"); +__RCSID("$NetBSD: selection.c,v 1.6 2004/01/05 11:17:14 jmmv Exp $"); #endif /* not lint */ #include <sys/ioctl.h> @@ -318,7 +318,8 @@ selection_wscons_event(struct wscons_event evt) selarea_hide(); cursor_hide(); - open_tty(evt.value); + if (!Selmouse.sm_mouse->m_disabled) + open_tty(evt.value); cursor_show(); if (Selmouse.sm_selecting) @@ -377,12 +378,10 @@ open_tty(int ttyno) if (Selmouse.sm_ttyfd >= 0) (void)close(Selmouse.sm_ttyfd); - if (!Selmouse.sm_mouse->m_disabled) { - (void)snprintf(buf, sizeof(buf), _PATH_TTYPREFIX "%d", ttyno); - Selmouse.sm_ttyfd = open(buf, O_RDONLY | O_NONBLOCK); - if (Selmouse.sm_ttyfd < 0) - log_warnx("cannot open %s", buf); - } + (void)snprintf(buf, sizeof(buf), _PATH_TTYPREFIX "%d", ttyno); + Selmouse.sm_ttyfd = open(buf, O_RDONLY | O_NONBLOCK); + if (Selmouse.sm_ttyfd < 0) + log_warnx("cannot open %s", buf); } /* ---------------------------------------------------------------------- */ |
