1
0
mirror of https://github.com/KDE/krfb synced 2026-07-01 15:51:18 -07:00

Compare commits

...

8 Commits

Author SHA1 Message Date
Albert Astals Cid
aaec9da9af GIT_SILENT Upgrade release service version to 24.04.90. 2024-05-09 01:11:32 +02:00
Aleix Pol
439ef7be28 pw: Fix build with last released KPipeWire release
(cherry picked from commit 0d3a38f39e)
2024-05-01 23:17:38 +02:00
l10n daemon script
5bfe3e7a51 GIT_SILENT Sync po/docbooks with svn 2024-04-24 03:37:18 +00:00
l10n daemon script
e85cfea214 GIT_SILENT made messages (after extraction) 2024-04-23 02:45:28 +00:00
Yaroslav Sidlovsky
d2f4b34fcb Fixed crash calling PWFrameBuffer::cursorPosition()
Return default QPoint when `d->cursor` is not set.

BUG: 472453
2024-04-22 19:46:32 +03:00
l10n daemon script
9422d0ccf1 GIT_SILENT Sync po/docbooks with svn 2024-04-22 03:49:20 +00:00
l10n daemon script
07803b9c3a GIT_SILENT made messages (after extraction) 2024-04-22 03:04:47 +00:00
Albert Astals Cid
6313e67237 GIT_SILENT Upgrade release service version to 24.04.80. 2024-04-21 11:31:56 +02:00
4 changed files with 27 additions and 5 deletions

View File

@@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 3.16)
# KDE Application Version, managed by release script
set (RELEASE_SERVICE_VERSION_MAJOR "24")
set (RELEASE_SERVICE_VERSION_MINOR "04")
set (RELEASE_SERVICE_VERSION_MICRO "70")
set (RELEASE_SERVICE_VERSION_MICRO "90")
set (RELEASE_SERVICE_VERSION "${RELEASE_SERVICE_VERSION_MAJOR}.${RELEASE_SERVICE_VERSION_MINOR}.${RELEASE_SERVICE_VERSION_MICRO}")
project(krfb VERSION ${RELEASE_SERVICE_VERSION})

View File

@@ -38,6 +38,12 @@ add_library(krfb_framebuffer_pw
MODULE
${krfb_framebuffer_pw_SRCS}
)
if (KPipeWire_VERSION VERSION_LESS "6.0.80")
target_compile_definitions(krfb_framebuffer_pw PRIVATE -DKPIPEWIRE60=1)
else()
target_compile_definitions(krfb_framebuffer_pw PRIVATE -DKPIPEWIRE60=0)
endif()
set_property(TARGET krfb_framebuffer_pw PROPERTY C_STANDARD 99)
target_link_libraries(krfb_framebuffer_pw

View File

@@ -340,17 +340,28 @@ void PWFrameBuffer::Private::handleFrame(const PipeWireFrame &frame)
{
cursor = frame.cursor;
#if KPIPEWIRE60
if (!frame.dmabuf && !frame.image) {
#else
if (!frame.dmabuf && !frame.dataFrame) {
#endif
qCDebug(KRFB_FB_PIPEWIRE) << "Got empty buffer. The buffer possibly carried only "
"information about the mouse cursor.";
return;
}
#if KPIPEWIRE60
if (frame.image) {
memcpy(q->fb, frame.image->constBits(), frame.image->sizeInBytes());
setVideoSize(frame.image->size());
}
#else
if (frame.dataFrame) {
// FIXME: Assuming stride == width * 4, not sure to which extent this holds
setVideoSize(frame.dataFrame->size);
memcpy(q->fb, frame.dataFrame->data, frame.dataFrame->size.width() * frame.dataFrame->stride);
}
#endif
else if (frame.dmabuf) {
// FIXME: Assuming stride == width * 4, not sure to which extent this holds
const QSize size = { frame.dmabuf->width, frame.dmabuf->height };
@@ -501,5 +512,10 @@ bool PWFrameBuffer::isValid() const
QPoint PWFrameBuffer::cursorPosition()
{
return d->cursor->position;
const auto cursor = d->cursor;
if (cursor) {
return cursor->position;
} else {
return {};
}
}

View File

@@ -3,7 +3,7 @@ msgstr ""
"Project-Id-Version: kdeorg\n"
"Report-Msgid-Bugs-To: https://bugs.kde.org\n"
"POT-Creation-Date: 2024-01-10 01:34+0000\n"
"PO-Revision-Date: 2024-03-30 19:37\n"
"PO-Revision-Date: 2024-04-22 16:01\n"
"Last-Translator: \n"
"Language-Team: Chinese Simplified\n"
"Language: zh_CN\n"
@@ -14,8 +14,8 @@ msgstr ""
"X-Crowdin-Project: kdeorg\n"
"X-Crowdin-Project-ID: 269464\n"
"X-Crowdin-Language: zh-CN\n"
"X-Crowdin-File: /kf6-trunk/messages/krfb/krfb.pot\n"
"X-Crowdin-File-ID: 49236\n"
"X-Crowdin-File: /kf6-stable/messages/krfb/krfb.pot\n"
"X-Crowdin-File-ID: 50988\n"
#, kde-format
msgctxt "NAME OF TRANSLATORS"