[server] Move static methods into anonymous namespace
This commit is contained in:
parent
bbfdf3f72a
commit
71fd67cca7
1 changed files with 4 additions and 0 deletions
|
@ -164,6 +164,7 @@ SeatInterface::Private *SeatInterface::Private::cast(wl_resource *r)
|
||||||
return r ? reinterpret_cast<SeatInterface::Private*>(wl_resource_get_user_data(r)) : nullptr;
|
return r ? reinterpret_cast<SeatInterface::Private*>(wl_resource_get_user_data(r)) : nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
namespace {
|
||||||
template <typename T>
|
template <typename T>
|
||||||
static
|
static
|
||||||
T *interfaceForSurface(SurfaceInterface *surface, const QVector<T*> &interfaces)
|
T *interfaceForSurface(SurfaceInterface *surface, const QVector<T*> &interfaces)
|
||||||
|
@ -179,6 +180,7 @@ T *interfaceForSurface(SurfaceInterface *surface, const QVector<T*> &interfaces)
|
||||||
}
|
}
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
PointerInterface *SeatInterface::Private::pointerForSurface(SurfaceInterface *surface) const
|
PointerInterface *SeatInterface::Private::pointerForSurface(SurfaceInterface *surface) const
|
||||||
{
|
{
|
||||||
|
@ -532,6 +534,7 @@ QPointF SeatInterface::focusedPointerSurfacePosition() const
|
||||||
return d->globalPointer.focus.offset;
|
return d->globalPointer.focus.offset;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
namespace {
|
||||||
static quint32 qtToWaylandButton(Qt::MouseButton button)
|
static quint32 qtToWaylandButton(Qt::MouseButton button)
|
||||||
{
|
{
|
||||||
static const QHash<Qt::MouseButton, quint32> s_buttons({
|
static const QHash<Qt::MouseButton, quint32> s_buttons({
|
||||||
|
@ -555,6 +558,7 @@ static quint32 qtToWaylandButton(Qt::MouseButton button)
|
||||||
});
|
});
|
||||||
return s_buttons.value(button, 0);
|
return s_buttons.value(button, 0);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
bool SeatInterface::isPointerButtonPressed(Qt::MouseButton button) const
|
bool SeatInterface::isPointerButtonPressed(Qt::MouseButton button) const
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue