mirror of
https://github.com/gnif/LookingGlass.git
synced 2026-11-13 07:17:28 +00:00
[idd] network: bind clipboard to input authority
This commit is contained in:
@@ -70,6 +70,12 @@ InputTargetState CInputHub::Source::GetState(
|
||||
return owner->GetState(Key(source));
|
||||
}
|
||||
|
||||
bool CInputHub::Source::WithAuthority(const InputSourceId& source,
|
||||
InputAuthorityAction action, void * opaque)
|
||||
{
|
||||
return owner->WithAuthority(Key(source), action, opaque);
|
||||
}
|
||||
|
||||
void CInputHub::Source::Failed()
|
||||
{
|
||||
owner->Failed(*this);
|
||||
@@ -565,6 +571,20 @@ InputTargetState CInputHub::GetState(const SourceKey& source)
|
||||
return result;
|
||||
}
|
||||
|
||||
bool CInputHub::WithAuthority(const SourceKey& source,
|
||||
InputAuthorityAction action, void * opaque)
|
||||
{
|
||||
if (!action)
|
||||
return false;
|
||||
|
||||
CSRWExclusiveLock lock(m_lock);
|
||||
if (!SourceValid(source) || !CheckState() || !OwnerValid(source))
|
||||
return false;
|
||||
|
||||
action(opaque);
|
||||
return true;
|
||||
}
|
||||
|
||||
void CInputHub::Failed(Source& source)
|
||||
{
|
||||
CSRWExclusiveLock lock(m_lock);
|
||||
|
||||
Reference in New Issue
Block a user