All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marcos Paulo de Souza <marcos.souza.org@gmail.com>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: "linux-input@vger.kernel.org" <linux-input@vger.kernel.org>
Subject: Re: uinput really needs a custom sleep time?
Date: Tue, 31 Jan 2017 23:11:29 -0200	[thread overview]
Message-ID: <20170201011126.GB1271@xfiles> (raw)
In-Reply-To: <CAKdAkRT3t7o3EQESpMPdZtcutaXbPHHqywt38YJtR53NPhZq2w@mail.gmail.com>

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
> <marcos.souza.org@gmail.com> wrote:
> > 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

  reply	other threads:[~2017-02-01  1:13 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-31  2:00 uinput really needs a custom sleep time? Marcos Paulo de Souza
2017-01-31  2:21 ` Dmitry Torokhov
2017-02-01  1:11   ` Marcos Paulo de Souza [this message]
2017-02-02 22:19 ` Peter Hutterer
2017-02-03  0:56   ` Marcos Paulo de Souza
2017-02-03  2:20   ` Marcos Paulo de Souza
2017-02-03  2:59     ` Peter Hutterer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170201011126.GB1271@xfiles \
    --to=marcos.souza.org@gmail.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=linux-input@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.