[server] Fix crash on updating focused keyboard surface

Authored by graesslin on Oct 24 2016, 9:17 AM.

Description

[server] Fix crash on updating focused keyboard surface

Summary:
In case the current selection does not have a DataSourceInterface
updating the focused keyboard surface resulted in a crash. The current
selection is sent to the DataDeviceInterface of the newly focused
client and thus a DataOfferInterface would be created for a null
DataSourceInterface.

This is a similar fix as D3148 and D3149.

Test Plan: Test case added which used to crash before

Reviewers: Plasma on Wayland

Subscribers: plasma-devel

Tags: Plasma on Wayland

Differential Revision: https://phabricator.kde.org/D3150

Details