Thread (7 messages) 7 messages, 3 authors, 2017-02-03

Re: uinput really needs a custom sleep time?

From: Marcos Paulo de Souza <hidden>
Date: 2017-02-01 01:13:10

On Mon, Jan 30, 2017 at 06:21:59PM -0800, Dmitry Torokhov wrote:
On Mon, Jan 30, 2017 at 6:00 PM, Marcos Paulo de Souza
[off-list ref] wrote:
quoted
Hi input guys,

after playing with uinput, it seems an sleep call is necessary before emitting new events. If this really required?

While reading code of cwiid project, another user of uinput interface, it seems this sleep time isn't necessary[1].

In the other hang, when trying to send a simple event in my desktop, an sleep is necessary, take a look in my example[2].
The sleep is not necessary for sending events, but you need to give
time for the rest of the system to notice that there is new input
device, decide what to do with it, and open it, so that you can
actually observe the events you sent, as opposed for them to be
dropped because there are no users of that input device.
Makes sense to wait to the Window Manager to "discover" the new input
device and to receive the events. Thanks for the clarification!
Thanks.

-- 
Dmitry
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help