[client] Properly track enteredSurface in Keyboard

Authored by graesslin on Jul 16 2017, 4:36 PM.

Description

[client] Properly track enteredSurface in Keyboard

Summary:
ASAN found a heap-use-after-free when deleting the focused keyboard
surface in the client library. Keyboard did not track the lifetime of
the focused surface and thus one can access already freed memory.

Test Plan: Adjusted auto test to verify the variable gets cleared

Reviewers: Frameworks, Plasma

Subscribers: plasma-devel

Tags: Plasma on Wayland, Frameworks

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