protocols: implement image-capture-source-v1 and image-copy-capture-v1 (#11709)
Implements the new screencopy protocols
This commit is contained in:
parent
93dbf88426
commit
b4ee4674f9
37 changed files with 2585 additions and 1078 deletions
|
|
@ -96,6 +96,10 @@ Vector2D CPointerManager::position() {
|
|||
return m_pointerPos;
|
||||
}
|
||||
|
||||
Vector2D CPointerManager::hotspot() {
|
||||
return m_currentCursorImage.hotspot;
|
||||
}
|
||||
|
||||
bool CPointerManager::hasCursor() {
|
||||
return m_currentCursorImage.pBuffer || m_currentCursorImage.surface;
|
||||
}
|
||||
|
|
@ -115,6 +119,7 @@ void CPointerManager::setCursorBuffer(SP<Aquamarine::IBuffer> buf, const Vector2
|
|||
m_currentCursorImage.scale = scale;
|
||||
updateCursorBackend();
|
||||
damageIfSoftware();
|
||||
m_events.cursorChanged.emit();
|
||||
}
|
||||
|
||||
return;
|
||||
|
|
@ -132,6 +137,7 @@ void CPointerManager::setCursorBuffer(SP<Aquamarine::IBuffer> buf, const Vector2
|
|||
|
||||
updateCursorBackend();
|
||||
damageIfSoftware();
|
||||
m_events.cursorChanged.emit();
|
||||
}
|
||||
|
||||
void CPointerManager::setCursorSurface(SP<Desktop::View::CWLSurface> surf, const Vector2D& hotspot) {
|
||||
|
|
@ -143,6 +149,7 @@ void CPointerManager::setCursorSurface(SP<Desktop::View::CWLSurface> surf, const
|
|||
m_currentCursorImage.scale = surf && surf->resource() ? surf->resource()->m_current.scale : 1.F;
|
||||
updateCursorBackend();
|
||||
damageIfSoftware();
|
||||
m_events.cursorChanged.emit();
|
||||
}
|
||||
|
||||
return;
|
||||
|
|
@ -164,6 +171,7 @@ void CPointerManager::setCursorSurface(SP<Desktop::View::CWLSurface> surf, const
|
|||
recheckEnteredOutputs();
|
||||
updateCursorBackend();
|
||||
damageIfSoftware();
|
||||
m_events.cursorChanged.emit();
|
||||
});
|
||||
|
||||
if (surf->resource()->m_current.texture) {
|
||||
|
|
@ -177,6 +185,7 @@ void CPointerManager::setCursorSurface(SP<Desktop::View::CWLSurface> surf, const
|
|||
recheckEnteredOutputs();
|
||||
updateCursorBackend();
|
||||
damageIfSoftware();
|
||||
m_events.cursorChanged.emit();
|
||||
}
|
||||
|
||||
void CPointerManager::recheckEnteredOutputs() {
|
||||
|
|
@ -261,6 +270,8 @@ void CPointerManager::resetCursorImage(bool apply) {
|
|||
ms->cursorFrontBuffer = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
m_events.cursorChanged.emit();
|
||||
}
|
||||
|
||||
void CPointerManager::updateCursorBackend() {
|
||||
|
|
@ -888,6 +899,10 @@ void CPointerManager::onMonitorLayoutChange() {
|
|||
damageIfSoftware();
|
||||
}
|
||||
|
||||
const CPointerManager::SCursorImage& CPointerManager::currentCursorImage() {
|
||||
return m_currentCursorImage;
|
||||
}
|
||||
|
||||
SP<CTexture> CPointerManager::getCurrentCursorTexture() {
|
||||
if (!m_currentCursorImage.pBuffer && (!m_currentCursorImage.surface || !m_currentCursorImage.surface->resource()->m_current.texture))
|
||||
return nullptr;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue