add a static PlasmaShellSurfaceInterface::get(wl_resource*)

to get the associated plasmashell surface from anywhere having
the associated resource
This commit is contained in:
Marco Martin 2015-11-04 13:21:37 +01:00
parent 72316718df
commit df22d2ac31
2 changed files with 11 additions and 0 deletions

View file

@ -320,5 +320,10 @@ bool PlasmaShellSurfaceInterface::skipTaskbar() const
return d->m_skipTaskbar;
}
PlasmaShellSurfaceInterface *PlasmaShellSurfaceInterface::get(wl_resource *native)
{
return Private::get<PlasmaShellSurfaceInterface>(native);
}
}
}

View file

@ -136,6 +136,12 @@ public:
*/
bool skipTaskbar() const;
/**
* @returns The PlasmaShellSurfaceInterface for the @p native resource.
* @since 5.5
**/
static PlasmaShellSurfaceInterface *get(wl_resource *native);
Q_SIGNALS:
/**
* A change of global position has been requested.