[server] Add a convenient method to check whether a Surface is mapped

Authored by graesslin on Mar 29 2016, 10:05 AM.

Description

[server] Add a convenient method to check whether a Surface is mapped

Summary:
In a SubSurface tree a Surface is only considered mapped if the Surface
has a buffer applied and the parent Surface is mapped.

The added method implements this check. It's useful for the compositor
to easily check this condition as it allows to easily figure out whether
a SubSurface needs to be rendered and it's also useful for implementing
the input handling as a not mapped sub-surface should not get any input
events.

Reviewers: Plasma

Subscribers: plasma-devel

Projects: Plasma

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