[PATCH weston 2/2] Reset the keyboard focus on all seats when the compositor is locked

Pekka Paalanen ppaalanen at gmail.com
Thu Apr 10 03:33:50 PDT 2014


On Wed, 09 Apr 2014 17:08:23 +0100
Neil Roberts <neil at linux.intel.com> wrote:

> "Jasper St. Pierre" <jstpierre at mecheye.net> writes:
> 
> > Why is this necessary? Won't events never be delivered while locked
> > anyway?
> 
> Events do seem to get delivered, you can try it if you run weston -i5
> and then open a terminal and let it lock. You can still type in the
> terminal and launch programs.

Yeah. The original design was because "it is just easier to control
focus" rather than to explicitly check what should be getting which
events under various conditions. So, take away focus, and put the lock
surface on top. The surfaces are still below the lock surface, but you
cannot click them or access any other way, so they won't get focus, and
the lock holds.

Or at least it was something like that once upon a time.

Maybe nowadays we actually remove a list from the layers list, I
haven't checked, but if you don't explicitly remove focus, a surface
will still get input. Also need to make sure the hidden surfaces cannot
regain focus.

> But yeah, I guess an alternative solution could be to block it at a
> lower level in the input handling code. I'm not sure whether that's a
> good idea though because eventually we might want a password entry or
> something on the lock screen and then we would want the keyboard to
> work. It would a shame to have to put too much special magic in there to
> get that to work.

Indeed.


Thanks,
pq


More information about the wayland-devel mailing list