nanogui: Make the mouse and keyboard optional but able to reconnect without restarting
Subject:
Make the mouse and keyboard optional but able to reconnect without restarting
From:
"Martin Kajdas" ####@####.####
Date:
25 Jun 2007 21:21:05 +0100
Message-Id: <CF2BB830A62F914F848E5AD5FFF57AC22915FB@mkmail.MKPROD.COM>
I have a situation where the mouse (mou_ser.c) and keyboard (ttyscan)
are optional but I need to be able to connect them at will and have the
app use them when connected.
Right now, I can use the app + nano-X with the mouse and keyboard.
I can also use the same app + the same nano-X without the mouse and
keyboard by returning -2 (instead of -1) from the appropriate drivers.
The problem is that when I connect the mouse/keyboard I need to restart
the app + nano-X to take advantage of it and this is not acceptable.
What I need is to have the app sense when the mouse/keyboard are
connected and use them and when they are not connected to not use them.
Before I take some wrong path, I thought I ask a question and maybe
there is some easy way of doing it.
I am thinking of having 1 sec. Timer to call some function (which one?)
to detect the presence of mouse/keyboard and calling the nano-X server
function (which one?) to enable/disable these services.
Any suggestions?
Martin