Subject: Adding a "wscons" pseudo-device
To: None <tech-kern@netbsd.org>
From: Julio Merino <jmmv@hispabsd.org>
List: tech-kern
Date: 06/12/2002 19:14:26
Hello

When I posted some time ago my mouse daemon patch, some of you argued that it
didn't address some possible problems:

1) What happens if the user switches console while selecting text?
2) How to manage X + console access to the same wsmouse device?

Well, I think I've found a clean solution which still allows the wsmoused daemon
to live entirely in user-space. That is, we may add a new pseudo-device, for
example /dev/wscons, where kernel injects events like "hey, user has changed
current console to number n", or "notice that user has changed to a X display".

Then, the wsmoused daemon would read from that device with a select() and take
proper actions when an event of this kind happens. If user changes current
console, then the daemon should restart the selection from the current point.
If the user changes to a X server, then the daemon should close wsmouse device
to allow X work with it, and when the user comes back to consone, reopen the
device.

What do you think? Can I go an implement this kind of pseudo-device if none of
current existing ones can suit this problem?

Thank you.

-- 
HispaBSD admin - http://www.hispabsd.org
Julio Merino <jmmv@hispabsd.org>