Reset the keyboard and pointer focus when attaching a null buffer
Reset the keyboard and pointer focus when attaching a null buffer

Improve QMenu/QMenuBar usability with keyboard: We really do not want
the keyboard focus to remain on hidden windows. For example when
opening a menu and pressing escape the focus must not be left on the
(existing, but hidden) menu widget's window.

This isn't perfect (ideally the compositor implementations should be
able to control this somehow by deciding to which window return the
focus to when the focused window goes away) but is better than nothing
and is identical to what Weston does.

Change-Id: Iad963182b74903cc3843460641611467db3c02ef
Reviewed-by: Samuel Rødal <99126055f8d73e4355b075213322026fa8c060bd@nokia.com>

locusf/qtwayland-1,locusf/qtwayland-1,ntanibata/qtwayland,ntanibata/qtwayland,Tofee/qtwayland,locusf/qtwayland-1,Tofee/qtwayland,Tofee/qtwayland,ntanibata/qtwayland,locusf/qtwayland-1