~3v1n0/unity/lockscreen-shield-ensure-grab

Viewing all changes in revision 3846.

  • Committer: Marco Trevisan (Treviño)
  • Date: 2014-07-30 18:33:31 UTC
  • Revision ID: mail@3v1n0.net-20140730183331-sxvnvgwuj7lxxm3e
LockScreenShield: Add GrabScreen function and retry to make sure we really get grab

It might happen that the grab is not possible because the PluginAdapter::IsScreenGrabbed
request has still not being fully processed, and thus nux is not able to grab the
pointer/keyboard. By doing this we instead try to grab the screen, and if this is
not happening, we wait a little until we don't get the ungrab event.

In this way, if we eventually get the grab, all will work as expected.
Otherwise, we cancel the lock request (very unlikely to happen).

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: