mirror of
https://github.com/KDE/krfb
synced 2026-07-01 15:51:18 -07:00
Compare commits
136 Commits
release/20
...
release/21
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
464d1a60a1 | ||
|
|
db9c1fe13b | ||
|
|
fbbbf69001 | ||
|
|
a58e344b22 | ||
|
|
061681aae5 | ||
|
|
d04a36023a | ||
|
|
f717ae06ce | ||
|
|
4660f86dfe | ||
|
|
4a36c727c2 | ||
|
|
c1a0a4cb38 | ||
|
|
aa5bf7273c | ||
|
|
0bcaf89886 | ||
|
|
5959b4690d | ||
|
|
c5ab3aab87 | ||
|
|
5d94a58da0 | ||
|
|
e3cb606713 | ||
|
|
d533b76f9b | ||
|
|
34a0e0c361 | ||
|
|
e1fdba3014 | ||
|
|
73500f837e | ||
|
|
f9a062ffa9 | ||
|
|
a4177eac39 | ||
|
|
15068b250c | ||
|
|
326d58a439 | ||
|
|
1a7f3a8517 | ||
|
|
3625b0cee3 | ||
|
|
7ef0dce382 | ||
|
|
72270006ca | ||
|
|
938f98cef5 | ||
|
|
93eb2d78d4 | ||
|
|
f041cdf095 | ||
|
|
e1e359fa7b | ||
|
|
50b72f26a8 | ||
|
|
2c184a22bf | ||
|
|
bb35068a1d | ||
|
|
706d4853b2 | ||
|
|
f03b829814 | ||
|
|
4335f83dab | ||
|
|
08d967af66 | ||
|
|
f0c1bc787e | ||
|
|
230040c5a9 | ||
|
|
dad7f0184b | ||
|
|
74070d3baa | ||
|
|
cceab8c12a | ||
|
|
b5a328b905 | ||
|
|
513b717fac | ||
|
|
a5f3009530 | ||
|
|
2b1f48b92a | ||
|
|
617f237d4e | ||
|
|
dcc1bb2de5 | ||
|
|
14aa98ccca | ||
|
|
717607b1c6 | ||
|
|
4e0aa9c78b | ||
|
|
e34043d514 | ||
|
|
8010c34bf1 | ||
|
|
5610c0a292 | ||
|
|
280c852a4e | ||
|
|
6518c17362 | ||
|
|
fcad3620db | ||
|
|
de7050d8b7 | ||
|
|
60c5d93f20 | ||
|
|
3a83ce6279 | ||
|
|
a109e3d6c9 | ||
|
|
4993e65d59 | ||
|
|
d91bbdcb05 | ||
|
|
1d429a9bc6 | ||
|
|
2b9cb5c58c | ||
|
|
6d9226c8d9 | ||
|
|
f67f629899 | ||
|
|
0e3733c327 | ||
|
|
fd362fd642 | ||
|
|
b14b7cc3a8 | ||
|
|
b71652061a | ||
|
|
9d02f073bd | ||
|
|
05f36df893 | ||
|
|
251d8f2e0e | ||
|
|
5aa1acd96b | ||
|
|
da2f51de6a | ||
|
|
47fbb3f316 | ||
|
|
7ba81f52df | ||
|
|
b9efda5956 | ||
|
|
f83d5102b6 | ||
|
|
8afd5c8df2 | ||
|
|
ef6b3a6093 | ||
|
|
9e1680d122 | ||
|
|
f3587b224f | ||
|
|
d4175c0f22 | ||
|
|
481972a129 | ||
|
|
e432a4ee7c | ||
|
|
f5768411e6 | ||
|
|
c5d6abab58 | ||
|
|
c5e157fa82 | ||
|
|
3e00ff22f9 | ||
|
|
068ce93465 | ||
|
|
9bb6fd224b | ||
|
|
024ce87b3a | ||
|
|
97951fc296 | ||
|
|
52fded8831 | ||
|
|
740f5c1449 | ||
|
|
1e9a91e83e | ||
|
|
933169b4c0 | ||
|
|
6f58476dbe | ||
|
|
f839da9ba2 | ||
|
|
76c2f08c9e | ||
|
|
b135370c5c | ||
|
|
b5adcd23c6 | ||
|
|
13f5de2518 | ||
|
|
cb83a9d539 | ||
|
|
c4f012a919 | ||
|
|
04c3f3e01e | ||
|
|
0cdc848844 | ||
|
|
e2daae290b | ||
|
|
c73c58b55d | ||
|
|
d983ed6869 | ||
|
|
b948d90c84 | ||
|
|
287919dbe2 | ||
|
|
b561ec1415 | ||
|
|
04d050a685 | ||
|
|
4f3e2f8bd9 | ||
|
|
f284736978 | ||
|
|
bdb4e9efbf | ||
|
|
425783b825 | ||
|
|
3cc2af7e18 | ||
|
|
49add727b0 | ||
|
|
10923d2e01 | ||
|
|
ebbedab547 | ||
|
|
e824ea5534 | ||
|
|
3462004357 | ||
|
|
d57a7e5aef | ||
|
|
60f8a418cd | ||
|
|
ed56b1b8f7 | ||
|
|
3f0f6e9efb | ||
|
|
3e2a8b0ce2 | ||
|
|
f178121c54 | ||
|
|
3f5dabf76b | ||
|
|
bb403a310f |
@@ -1,15 +1,15 @@
|
||||
cmake_minimum_required(VERSION 3.0)
|
||||
|
||||
# KDE Application Version, managed by release script
|
||||
set (RELEASE_SERVICE_VERSION_MAJOR "20")
|
||||
set (RELEASE_SERVICE_VERSION_MINOR "03")
|
||||
set (RELEASE_SERVICE_VERSION_MICRO "70")
|
||||
set (RELEASE_SERVICE_VERSION_MAJOR "21")
|
||||
set (RELEASE_SERVICE_VERSION_MINOR "04")
|
||||
set (RELEASE_SERVICE_VERSION_MICRO "3")
|
||||
set (RELEASE_SERVICE_VERSION "${RELEASE_SERVICE_VERSION_MAJOR}.${RELEASE_SERVICE_VERSION_MINOR}.${RELEASE_SERVICE_VERSION_MICRO}")
|
||||
|
||||
project(krfb VERSION ${RELEASE_SERVICE_VERSION})
|
||||
|
||||
set(QT_MIN_VERSION 5.6.0)
|
||||
set(KF5_MIN_VERSION 5.31.0)
|
||||
set(QT_MIN_VERSION 5.12.0)
|
||||
set(KF5_MIN_VERSION 5.68.0)
|
||||
|
||||
find_package(ECM ${KF5_MIN_VERSION} NO_MODULE REQUIRED)
|
||||
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules" ${ECM_MODULE_PATH})
|
||||
@@ -20,6 +20,7 @@ include(KDECompilerSettings NO_POLICY_SCOPE)
|
||||
include(ECMInstallIcons)
|
||||
include(ECMAddAppIcon)
|
||||
include(ECMSetupVersion)
|
||||
include(ECMQtDeclareLoggingCategory)
|
||||
include(FeatureSummary)
|
||||
include(CheckIncludeFile)
|
||||
|
||||
@@ -29,7 +30,6 @@ find_package(Qt5 ${QT_MIN_VERSION} REQUIRED COMPONENTS Core DBus Widgets X11Extr
|
||||
|
||||
find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS
|
||||
I18n
|
||||
Completion
|
||||
Config
|
||||
CoreAddons
|
||||
Crash
|
||||
@@ -104,4 +104,10 @@ add_subdirectory(framebuffers)
|
||||
add_subdirectory(doc)
|
||||
add_subdirectory(icons)
|
||||
|
||||
ecm_qt_install_logging_categories(
|
||||
EXPORT KRFB
|
||||
FILE krfb.categories
|
||||
DESTINATION ${KDE_INSTALL_LOGGINGCATEGORIESDIR}
|
||||
)
|
||||
|
||||
feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
########### install files ###############
|
||||
kdoctools_create_handbook(index.docbook INSTALL_DESTINATION ${HTML_INSTALL_DIR}/en SUBDIR krfb)
|
||||
kdoctools_create_handbook(index.docbook INSTALL_DESTINATION ${KDE_INSTALL_DOCBUNDLEDIR}/en SUBDIR krfb)
|
||||
|
||||
@@ -15,4 +15,4 @@ target_link_libraries (krfb_events_x11
|
||||
krfbprivate
|
||||
)
|
||||
|
||||
install (TARGETS krfb_events_x11 DESTINATION ${PLUGIN_INSTALL_DIR}/krfb)
|
||||
install (TARGETS krfb_events_x11 DESTINATION ${KDE_INSTALL_PLUGINDIR}/krfb)
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
[Desktop Entry]
|
||||
Encoding=UTF-8
|
||||
Comment=X11 XFakeInput based event handler for KRfb
|
||||
Comment[ca]=Gestor d'esdeveniments basat en el XFakeInput de l'X11 per al KRfb
|
||||
Comment[ca@valencia]=Gestor d'esdeveniments basat en el XFakeInput de l'X11 per al KRfb
|
||||
Comment[ca]=Gestor d'esdeveniments basat en «XFakeInput» de l'X11 per al KRfb
|
||||
Comment[ca@valencia]=Gestor d'esdeveniments basat en «XFakeInput» de l'X11 per al KRfb
|
||||
Comment[da]=X11 XFakeInput baseret hændelseshåndtering til KRfb
|
||||
Comment[de]=Ereignis-Modul basierend auf X11 XFakeInput für KRfb
|
||||
Comment[el]=Χειριστής γεγονότων με βάση το X11 XFakeInput για το KRfb
|
||||
Comment[en_GB]=X11 XFakeInput based event handler for KRfb
|
||||
@@ -12,6 +13,7 @@ Comment[eu]=KRfb-rako «X11 XFakeInput»en oinarritutako gertaera maneiatzailea
|
||||
Comment[fi]=KRfb:n X11 XFakeInput -pohjainen tapahtumakäsittelijä
|
||||
Comment[fr]=Gestionnaire d'évènements utilisant XFakeInput de X11 pour KRfb
|
||||
Comment[gl]=Xestor de eventos para KRfb baseado no XFakeInput de X11
|
||||
Comment[ia]=Maneator de evento de X11 basate sur XFakeInput per KRfb
|
||||
Comment[it]=Gestore eventi basato su XFakeInput di X11 per KRfb
|
||||
Comment[ko]=X11 XFakeInput 기반 KRfb 이벤트 핸들러
|
||||
Comment[nl]=Op X11 XFakeInput gebaseerde behandelaar van gebeurtenis voor KRfb
|
||||
@@ -20,14 +22,16 @@ Comment[pl]=Obsługa wydarzeń X11 oparta na XFakeInput dla KRfb
|
||||
Comment[pt]=Tratamento de eventos baseado no XFakeInput do X11 para o KRfb
|
||||
Comment[pt_BR]=Manipulador de eventos baseado no XFakeInput do X11 para o KRfb
|
||||
Comment[sk]=X11 Spracovateľ udalostí založený na XFakeInput pre KRfb
|
||||
Comment[sl]=Upravljalnik dogodkov za KRfb na podlagi X11 XFakeInput
|
||||
Comment[sv]=Händelsehanterare för Krfb baserad på X11 XFakeInput
|
||||
Comment[uk]=Обробник подій для KRfb на основі XFakeInput X11
|
||||
Comment[x-test]=xxX11 XFakeInput based event handler for KRfbxx
|
||||
Comment[zh_CN]=基于 X11 XFakeInput 的 KRfb 事件处理器
|
||||
Comment[zh_TW]=KRfb 基於 X11 XFakeInput 的事件處理器
|
||||
Name=X11 XFakeInput based event handler for KRfb
|
||||
Name[ca]=Gestor d'esdeveniments basat en el XFakeInput de l'X11 per al KRfb
|
||||
Name[ca@valencia]=Gestor d'esdeveniments basat en el XFakeInput de l'X11 per al KRfb
|
||||
Name[ca]=Gestor d'esdeveniments basat en «XFakeInput» de l'X11 per al KRfb
|
||||
Name[ca@valencia]=Gestor d'esdeveniments basat en «XFakeInput» de l'X11 per al KRfb
|
||||
Name[da]=X11 XFakeInput baseret hændelseshåndtering til KRfb
|
||||
Name[de]=Ereignis-Modul basierend auf X11 XFakeInput für KRfb
|
||||
Name[el]=Χειριστής γεγονότων με βάση το X11 XFakeInput για το KRfb
|
||||
Name[en_GB]=X11 XFakeInput based event handler for KRfb
|
||||
@@ -37,6 +41,7 @@ Name[eu]=KRfb-rako «X11 XFakeInput»en oinarritutako gertaera maneiatzailea
|
||||
Name[fi]=KRfb:n X11 XFakeInput -pohjainen tapahtumakäsittelijä
|
||||
Name[fr]=Gestionnaire d'évènements utilisant XFakeInput de X11 pour KRfb
|
||||
Name[gl]=Xestor de eventos para KRfb baseado no XFakeInput de X11
|
||||
Name[ia]=Maneator de evento de X11 basate sur XFakeInput per KRfb
|
||||
Name[it]=Gestore eventi basato su XFakeInput di X11 per KRfb
|
||||
Name[ko]=X11 XFakeInput 기반 KRfb 이벤트 핸들러
|
||||
Name[nl]=Op X11 XFakeInput gebaseerde behandelaar van gebeurtenis voor KRfb
|
||||
@@ -45,6 +50,7 @@ Name[pl]=Obsługa wydarzeń X11 oparta na XFakeInput dla KRfb
|
||||
Name[pt]=Tratamento de eventos baseado no XFakeInput do X11 para o KRfb
|
||||
Name[pt_BR]=Manipulador de eventos baseado no XFakeInput do X11 para o KRfb
|
||||
Name[sk]=X11 Spracovateľ udalostí založený na XFakeInput pre KRfb
|
||||
Name[sl]=Upravljalnik dogodkov za KRfb na podlagi X11 XFakeInput
|
||||
Name[sv]=Händelsehanterare för Krfb baserad på X11 XFakeInput
|
||||
Name[uk]=Обробник подій для KRfb на основі XFakeInput X11
|
||||
Name[x-test]=xxX11 XFakeInput based event handler for KRfbxx
|
||||
|
||||
@@ -2,8 +2,9 @@
|
||||
"Encoding": "UTF-8",
|
||||
"KPlugin": {
|
||||
"Description": "X11 XFakeInput based event handler for KRfb",
|
||||
"Description[ca@valencia]": "Gestor d'esdeveniments basat en el XFakeInput de l'X11 per al KRfb",
|
||||
"Description[ca]": "Gestor d'esdeveniments basat en el XFakeInput de l'X11 per al KRfb",
|
||||
"Description[ca@valencia]": "Gestor d'esdeveniments basat en «XFakeInput» de l'X11 per al KRfb",
|
||||
"Description[ca]": "Gestor d'esdeveniments basat en «XFakeInput» de l'X11 per al KRfb",
|
||||
"Description[da]": "X11 XFakeInput baseret hændelseshåndtering til KRfb",
|
||||
"Description[de]": "Ereignis-Modul basierend auf X11 XFakeInput für KRfb",
|
||||
"Description[el]": "Χειριστής γεγονότων με βάση το X11 XFakeInput για το KRfb",
|
||||
"Description[en_GB]": "X11 XFakeInput based event handler for KRfb",
|
||||
@@ -13,6 +14,7 @@
|
||||
"Description[fi]": "KRfb:n X11 XFakeInput -pohjainen tapahtumakäsittelijä",
|
||||
"Description[fr]": "Gestionnaire d'évènements utilisant XFakeInput de X11 pour KRfb",
|
||||
"Description[gl]": "Xestor de eventos para KRfb baseado no XFakeInput de X11",
|
||||
"Description[ia]": "Maneator de evento de X11 basate sur XFakeInput per KRfb",
|
||||
"Description[it]": "Gestore eventi basato su XFakeInput di X11 per KRfb",
|
||||
"Description[ko]": "X11 XFakeInput 기반 KRfb 이벤트 핸들러",
|
||||
"Description[nl]": "Op X11 XFakeInput gebaseerde behandelaar van gebeurtenis voor KRfb",
|
||||
@@ -21,6 +23,7 @@
|
||||
"Description[pt]": "Tratamento de eventos baseado no XFakeInput do X11 para o KRfb",
|
||||
"Description[pt_BR]": "Manipulador de eventos baseado no XFakeInput do X11 para o KRfb",
|
||||
"Description[sk]": "X11 Spracovateľ udalostí založený na XFakeInput pre KRfb",
|
||||
"Description[sl]": "Upravljavec dogodkov za KRfb na osnovi X11 XFakeInput",
|
||||
"Description[sv]": "Händelsehanterare för KRfb baserad på X11 XFakeInput",
|
||||
"Description[uk]": "Обробник подій для KRfb на основі XFakeInput X11",
|
||||
"Description[x-test]": "xxX11 XFakeInput based event handler for KRfbxx",
|
||||
@@ -32,6 +35,7 @@
|
||||
"Name": "X11 Event handler for KRfb",
|
||||
"Name[ca@valencia]": "Gestor d'esdeveniments de l'X11 per al KRfb",
|
||||
"Name[ca]": "Gestor d'esdeveniments de l'X11 per al KRfb",
|
||||
"Name[da]": "X11 hændelseshåndtering til KRfb",
|
||||
"Name[de]": "Ereignis-Modul basierend auf X11 für KRfb",
|
||||
"Name[el]": "Χειριστής γεγονότων X11 για το KRfb",
|
||||
"Name[en_GB]": "X11 Event handler for KRfb",
|
||||
@@ -41,6 +45,7 @@
|
||||
"Name[fi]": "KRfb:n X11-tapahtumakäsittelijä",
|
||||
"Name[fr]": "Gestionnaire d'évènements X11 pour KRfb",
|
||||
"Name[gl]": "Xestor de eventos de X11 para KRfb",
|
||||
"Name[ia]": "Manipulator de evento de X11 per KRfb",
|
||||
"Name[it]": "Gestore eventi X11 per KRfb",
|
||||
"Name[ko]": "KRfb X11 이벤트 핸들러",
|
||||
"Name[nl]": "Op X11 behandelaar van gebeurtenis voor KRfb",
|
||||
@@ -49,6 +54,7 @@
|
||||
"Name[pt]": "Tratamento de eventos do X11 para o KRfb",
|
||||
"Name[pt_BR]": "Manipulador de eventos do X11 para o KRfb",
|
||||
"Name[sk]": "X11 Obsluha udalostí pre KRfb",
|
||||
"Name[sl]": "Upravljavec dogodkov za KRfb na osnovi X11",
|
||||
"Name[sv]": "X11-händelsehanterare för Krfb",
|
||||
"Name[uk]": "Обробник подій для KRfb на основі X11",
|
||||
"Name[x-test]": "xxX11 Event handler for KRfbxx",
|
||||
|
||||
@@ -44,18 +44,18 @@ public:
|
||||
EventData();
|
||||
|
||||
//keyboard
|
||||
Display *dpy;
|
||||
signed char modifiers[0x100];
|
||||
KeyCode keycodes[0x100];
|
||||
KeyCode leftShiftCode;
|
||||
KeyCode rightShiftCode;
|
||||
KeyCode altGrCode;
|
||||
char modifierState;
|
||||
Display *dpy = nullptr;
|
||||
signed char modifiers[0x100] = {};
|
||||
KeyCode keycodes[0x100] = {};
|
||||
KeyCode leftShiftCode = 0;
|
||||
KeyCode rightShiftCode = 0;
|
||||
KeyCode altGrCode = 0;
|
||||
char modifierState = 0;
|
||||
|
||||
//mouse
|
||||
int buttonMask;
|
||||
int x;
|
||||
int y;
|
||||
int buttonMask = 0;
|
||||
int x = 0;
|
||||
int y = 0;
|
||||
|
||||
private:
|
||||
void init();
|
||||
|
||||
@@ -23,5 +23,5 @@ target_link_libraries (krfb_events_xdp
|
||||
)
|
||||
|
||||
install (TARGETS krfb_events_xdp
|
||||
DESTINATION ${PLUGIN_INSTALL_DIR}/krfb
|
||||
DESTINATION ${KDE_INSTALL_PLUGINDIR}/krfb
|
||||
)
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
[Desktop Entry]
|
||||
Encoding=UTF-8
|
||||
Comment=Xdg-desktop-portal based event handler for KRfb
|
||||
Comment[ca]=Gestor d'esdeveniments basat en el Xdg-desktop-portal per al KRfb
|
||||
Comment[ca@valencia]=Gestor d'esdeveniments basat en el Xdg-desktop-portal per al KRfb
|
||||
Comment[ca]=Gestor d'esdeveniments basat en «Xdg-desktop-portal» per al KRfb
|
||||
Comment[ca@valencia]=Gestor d'esdeveniments basat en «Xdg-desktop-portal» per al KRfb
|
||||
Comment[da]=Xdg-desktop-portal baseret hændelseshåndtering til KRfb
|
||||
Comment[de]=Ereignis-Modul basierend auf Xdg-desktop-portal für KRfb
|
||||
Comment[el]=Χειριστής γεγονότων με βάση το xdg-desktop-portal για το KRfb
|
||||
Comment[en_GB]=Xdg-desktop-portal based event handler for KRfb
|
||||
@@ -12,6 +13,7 @@ Comment[eu]=KRfb-rako «xdg-desktop-portal»en oinarritutako maneiatzailea
|
||||
Comment[fi]=KRfb:n XDG-desktop-portal-pohjainen tapahtumakäsittelijä
|
||||
Comment[fr]=Gestionnaire d'évènements utilisant Xdg-desktop-portal pour KRfb
|
||||
Comment[gl]=Xestor de eventos para KRfb baseado en Xdg-desktop-portal
|
||||
Comment[ia]=Maneator de evento basate sur Xdg-desktop-portal per KRfb
|
||||
Comment[it]=Gestore eventi basato su xdg-desktop-portal per KRfb
|
||||
Comment[ko]=Xdg-desktop-portal 기반 KRfb 이벤트 핸들러
|
||||
Comment[nl]=Op Xdg-desktop-portal gebaseerde behandelaar van gebeurtenis voor KRfb
|
||||
@@ -20,14 +22,16 @@ Comment[pl]=Obsługa wydarzeń oparta na Xdg-desktop-portal dla KRfb
|
||||
Comment[pt]=Tratamento de eventos baseado no Xdg-desktop-portal para o KRfb
|
||||
Comment[pt_BR]=Manipulador de eventos baseado no xdg-desktop-portal para o KRfb
|
||||
Comment[sk]=Obsluha udalostí založená na Xdg-desktop-portal pre KRfb
|
||||
Comment[sl]=Upravljalnik dogodkov za KRfb na podlagi namiznega portala Xdg
|
||||
Comment[sv]=Händelsehanterare för Krfb baserad på xdg-desktop-portal
|
||||
Comment[uk]=Обробник подій для KRfb на основі Xdg-desktop-portal
|
||||
Comment[x-test]=xxXdg-desktop-portal based event handler for KRfbxx
|
||||
Comment[zh_CN]=基于 xdg-desktop-portal 的 KRfb 事件处理器
|
||||
Comment[zh_TW]=KRfb 基於 Xdg-desktop-portal 的事件處理器
|
||||
Name=Xdg-desktop-portal based event handler for KRfb
|
||||
Name[ca]=Gestor d'esdeveniments basat en el Xdg-desktop-portal per al KRfb
|
||||
Name[ca@valencia]=Gestor d'esdeveniments basat en el Xdg-desktop-portal per al KRfb
|
||||
Name[ca]=Gestor d'esdeveniments basat en «Xdg-desktop-portal» per al KRfb
|
||||
Name[ca@valencia]=Gestor d'esdeveniments basat en «Xdg-desktop-portal» per al KRfb
|
||||
Name[da]=Xdg-desktop-portal baseret hændelseshåndtering til KRfb
|
||||
Name[de]=Ereignis-Modul basierend auf Xdg-desktop-portal für KRfb
|
||||
Name[el]=Χειριστής γεγονότων με βάση το xdg-desktop-portal για το KRfb
|
||||
Name[en_GB]=Xdg-desktop-portal based event handler for KRfb
|
||||
@@ -37,6 +41,7 @@ Name[eu]=KRfb-rako «xdg-desktop-portal»en oinarritutako maneiatzailea
|
||||
Name[fi]=KRfb:n XDG-desktop-portal-pohjainen tapahtumakäsittelijä
|
||||
Name[fr]=Gestionnaire d'évènements utilisant Xdg-desktop-portal pour KRfb
|
||||
Name[gl]=Xestor de eventos para KRfb baseado en Xdg-desktop-portal
|
||||
Name[ia]=Mneator de evento basate sur Xdg-desktop-portal per KRfb
|
||||
Name[it]=Gestore eventi basato su xdg-desktop-portal per KRfb
|
||||
Name[ko]=Xdg-desktop-portal 기반 KRfb 이벤트 핸들러
|
||||
Name[nl]=Op Xdg-desktop-portal gebaseerde behandelaar van gebeurtenis voor KRfb
|
||||
@@ -45,6 +50,7 @@ Name[pl]=Obsługa wydarzeń oparta na Xdg-desktop-portal dla KRfb
|
||||
Name[pt]=Tratamento de eventos baseado no Xdg-desktop-portal para o KRfb
|
||||
Name[pt_BR]=Manipulador de eventos baseado no xdg-desktop-portal para o KRfb
|
||||
Name[sk]=Obsluha udalostí založená na Xdg-desktop-portal pre KRfb
|
||||
Name[sl]=Upravljalnik dogodkov za KRfb na podlagi namiznega portala Xdg
|
||||
Name[sv]=Händelsehanterare för Krfb baserad på xdg-desktop-portal
|
||||
Name[uk]=Обробник подій для KRfb на основі Xdg-desktop-portal
|
||||
Name[x-test]=xxXdg-desktop-portal based event handler for KRfbxx
|
||||
|
||||
@@ -2,8 +2,9 @@
|
||||
"Encoding": "UTF-8",
|
||||
"KPlugin": {
|
||||
"Description": "Xdg-desktop-portal based event handler for KRfb",
|
||||
"Description[ca@valencia]": "Gestor d'esdeveniments basat en el Xdg-desktop-portal per al KRfb",
|
||||
"Description[ca]": "Gestor d'esdeveniments basat en el Xdg-desktop-portal per al KRfb",
|
||||
"Description[ca@valencia]": "Gestor d'esdeveniments basat en «Xdg-desktop-portal» per al KRfb",
|
||||
"Description[ca]": "Gestor d'esdeveniments basat en «Xdg-desktop-portal» per al KRfb",
|
||||
"Description[da]": "Xdg-desktop-portal baseret hændelseshåndtering til KRfb",
|
||||
"Description[de]": "Ereignis-Modul basierend auf Xdg-desktop-portal für KRfb",
|
||||
"Description[el]": "Χειριστής γεγονότων με βάση το xdg-desktop-portal για το KRfb",
|
||||
"Description[en_GB]": "Xdg-desktop-portal based event handler for KRfb",
|
||||
@@ -13,6 +14,7 @@
|
||||
"Description[fi]": "KRfb:n XDG-desktop-portal-pohjainen tapahtumakäsittelijä",
|
||||
"Description[fr]": "Gestionnaire d'évènements utilisant Xdg-desktop-portal pour KRfb",
|
||||
"Description[gl]": "Xestor de eventos para KRfb baseado en Xdg-desktop-portal",
|
||||
"Description[ia]": "Maneator de evento basate sur Xdg-desktop-portal per KRfb",
|
||||
"Description[it]": "Gestore eventi basato su xdg-desktop-portal per KRfb",
|
||||
"Description[ko]": "Xdg-desktop-portal 기반 KRfb 이벤트 핸들러",
|
||||
"Description[nl]": "Op Xdg-desktop-portal gebaseerde behandelaar van gebeurtenis voor KRfb",
|
||||
@@ -21,6 +23,7 @@
|
||||
"Description[pt]": "Tratamento de eventos baseado no Xdg-desktop-portal para o KRfb",
|
||||
"Description[pt_BR]": "Manipulador de eventos baseado no xdg-desktop-portal para o KRfb",
|
||||
"Description[sk]": "Obsluha udalostí založená na Xdg-desktop-portal pre KRfb",
|
||||
"Description[sl]": "Upravljavec dogodkov, na osnovi portala Xdg-desktop za KRfb",
|
||||
"Description[sv]": "Händelsehanterare för KRfb baserad på xdg-desktop-portal",
|
||||
"Description[uk]": "Обробник подій для KRfb на основі Xdg-desktop-portal",
|
||||
"Description[x-test]": "xxXdg-desktop-portal based event handler for KRfbxx",
|
||||
@@ -30,8 +33,9 @@
|
||||
"Id": "xdp",
|
||||
"License": "GPL",
|
||||
"Name": "Xdg-desktop-portal Event handler for KRfb",
|
||||
"Name[ca@valencia]": "Gestor d'esdeveniments Xdg-desktop-portal per al KRfb",
|
||||
"Name[ca]": "Gestor d'esdeveniments Xdg-desktop-portal per al KRfb",
|
||||
"Name[ca@valencia]": "Gestor d'esdeveniments «Xdg-desktop-portal» per al KRfb",
|
||||
"Name[ca]": "Gestor d'esdeveniments «Xdg-desktop-portal» per al KRfb",
|
||||
"Name[da]": "Xdg-desktop-portal hændelseshåndtering til KRfb",
|
||||
"Name[de]": "Ereignis-Modul basierend auf Xdg-desktop-portal für KRfb",
|
||||
"Name[el]": "Χειριστής γεγονότων xdg-desktop-portal για το KRfb",
|
||||
"Name[en_GB]": "Xdg-desktop-portal Event handler for KRfb",
|
||||
@@ -41,6 +45,7 @@
|
||||
"Name[fi]": "KRfb:n XDG-desktop-portal-pohjainen tapahtumakäsittelijä",
|
||||
"Name[fr]": "Gestionnaire d'évènements Xdg-desktop-portal pour KRfb",
|
||||
"Name[gl]": "Xestor de eventos de Xdg-desktop-portal para KRfb",
|
||||
"Name[ia]": "Maneator de evento basate sur Xdg-desktop-portal per KRfb",
|
||||
"Name[it]": "Gestore eventi xdg-desktop-portal per KRfb",
|
||||
"Name[ko]": "KRfb Xdg-desktop-portal 이벤트 핸들러",
|
||||
"Name[nl]": "Op Xdg-desktop-portal behandelaar van gebeurtenis voor KRfb",
|
||||
@@ -49,6 +54,7 @@
|
||||
"Name[pt]": "Tratamento de eventos do Xdg-desktop-portal para o KRfb",
|
||||
"Name[pt_BR]": "Manipulador de eventos xdg-desktop-portal para o KRfb",
|
||||
"Name[sk]": "Xdg-desktop-portal Obsluha udalostí pre KRfb",
|
||||
"Name[sl]": "Upravljavec dogodkov za KRfb na osnovi portala Xdg-desktop",
|
||||
"Name[sv]": "Xdg-desktop-portal händelsehanterare för Krfb",
|
||||
"Name[uk]": "Обробник подій для KRfb на основі Xdg-desktop-portal",
|
||||
"Name[x-test]": "xxXdg-desktop-portal Event handler for KRfbxx",
|
||||
|
||||
@@ -36,9 +36,9 @@ public:
|
||||
EventData();
|
||||
|
||||
//mouse
|
||||
int buttonMask;
|
||||
int x;
|
||||
int y;
|
||||
int buttonMask = 0;
|
||||
int x = 0;
|
||||
int y = 0;
|
||||
|
||||
QScopedPointer<OrgFreedesktopPortalRemoteDesktopInterface> dbusXdpRemoteDesktopService;
|
||||
|
||||
@@ -55,10 +55,8 @@ EventData::EventData()
|
||||
|
||||
void EventData::init()
|
||||
{
|
||||
buttonMask = 0;
|
||||
|
||||
dbusXdpRemoteDesktopService.reset(new OrgFreedesktopPortalRemoteDesktopInterface(QLatin1String("org.freedesktop.portal.Desktop"),
|
||||
QLatin1String("/org/freedesktop/portal/desktop"), QDBusConnection::sessionBus()));
|
||||
dbusXdpRemoteDesktopService.reset(new OrgFreedesktopPortalRemoteDesktopInterface(QStringLiteral("org.freedesktop.portal.Desktop"),
|
||||
QStringLiteral("/org/freedesktop/portal/desktop"), QDBusConnection::sessionBus()));
|
||||
}
|
||||
|
||||
void XdpEventHandler::handleKeyboard(bool down, rfbKeySym keySym)
|
||||
@@ -71,8 +69,8 @@ void XdpEventHandler::handleKeyboard(bool down, rfbKeySym keySym)
|
||||
|
||||
void XdpEventHandler::handlePointer(int buttonMask, int x, int y)
|
||||
{
|
||||
const uint streamNodeId = frameBuffer()->customProperty(QLatin1String("stream_node_id")).toUInt();
|
||||
const QDBusObjectPath sessionHandle = frameBuffer()->customProperty(QLatin1String("session_handle")).value<QDBusObjectPath>();
|
||||
const uint streamNodeId = frameBuffer()->customProperty(QStringLiteral("stream_node_id")).toUInt();
|
||||
const QDBusObjectPath sessionHandle = frameBuffer()->customProperty(QStringLiteral("session_handle")).value<QDBusObjectPath>();
|
||||
|
||||
if (streamNodeId == 0 || sessionHandle.path().isEmpty()) {
|
||||
return;
|
||||
|
||||
@@ -7,6 +7,15 @@ set (krfb_framebuffer_pw_SRCS
|
||||
pw_framebufferplugin.cpp
|
||||
)
|
||||
|
||||
|
||||
ecm_qt_declare_logging_category(krfb_framebuffer_pw_SRCS
|
||||
HEADER krfb_fb_pipewire_debug.h
|
||||
IDENTIFIER KRFB_FB_PIPEWIRE
|
||||
CATEGORY_NAME krfb.framebuffer.pipewire
|
||||
DESCRIPTION "KRFB PipeWire framebuffer plugin"
|
||||
EXPORT KRFB
|
||||
)
|
||||
|
||||
qt5_add_dbus_interface(
|
||||
krfb_framebuffer_pw_SRCS
|
||||
${CMAKE_SOURCE_DIR}/dbus/xdp_dbus_screencast_interface.xml
|
||||
@@ -24,6 +33,12 @@ add_library(krfb_framebuffer_pw
|
||||
${krfb_framebuffer_pw_SRCS}
|
||||
)
|
||||
|
||||
|
||||
check_include_file("linux/dma-buf.h" HAVE_LINUX_DMABUF_H)
|
||||
if (HAVE_LINUX_DMABUF_H)
|
||||
target_compile_definitions(krfb_framebuffer_pw PRIVATE -DHAVE_LINUX_DMABUF_H)
|
||||
endif ()
|
||||
|
||||
target_link_libraries (krfb_framebuffer_pw
|
||||
Qt5::Core
|
||||
Qt5::Gui
|
||||
@@ -34,5 +49,5 @@ target_link_libraries (krfb_framebuffer_pw
|
||||
)
|
||||
|
||||
install (TARGETS krfb_framebuffer_pw
|
||||
DESTINATION ${PLUGIN_INSTALL_DIR}/krfb
|
||||
DESTINATION ${KDE_INSTALL_PLUGINDIR}/krfb
|
||||
)
|
||||
|
||||
@@ -2,9 +2,10 @@
|
||||
"Encoding": "UTF-8",
|
||||
"KPlugin": {
|
||||
"Description": "PipeWire based Framebuffer for KRfb.",
|
||||
"Description[ca@valencia]": "«Framebuffer» basat en el PipeWire per al KRfb.",
|
||||
"Description[ca]": "«Framebuffer» basat en el PipeWire per al KRfb.",
|
||||
"Description[ca@valencia]": "«Framebuffer» basat en «PipeWire» per al KRfb.",
|
||||
"Description[ca]": "«Framebuffer» basat en «PipeWire» per al KRfb.",
|
||||
"Description[cs]": "Framebuffer založený na Pipe pro KRfb.",
|
||||
"Description[da]": "PipeWire baseret framebuffer til KRfb.",
|
||||
"Description[de]": "PipeWire-basierter Framebuffer für KRfb.",
|
||||
"Description[el]": "Μνήμη ανανέωσης με βάση το pipewire για το KRfb.",
|
||||
"Description[en_GB]": "PipeWire based Framebuffer for KRfb.",
|
||||
@@ -14,6 +15,7 @@
|
||||
"Description[fi]": "KRfb:n PipeWire-pohjainen kehyspuskuri.",
|
||||
"Description[fr]": "Tampon d'images utilisant PipeWire pour KRfb.",
|
||||
"Description[gl]": "Búfer de fotograma para KRfb baseado en PipeWire.",
|
||||
"Description[ia]": "Framebuffer basate sur PipeWire per KRfb.",
|
||||
"Description[it]": "Framebuffer basato su PipeWire per KRfb.",
|
||||
"Description[ko]": "KRfb용 PipeWire 기반 프레임버퍼입니다.",
|
||||
"Description[nl]": "Op PipeWire gebaseerd framebuffer voor KRfb.",
|
||||
@@ -23,6 +25,7 @@
|
||||
"Description[pt_BR]": "Framebuffer baseado no PipeWire para o KRfb.",
|
||||
"Description[ru]": "Буфер кадров для KRfb на базе Framebuffer",
|
||||
"Description[sk]": "Framebuffer založený na PipeWire pre KRfb.",
|
||||
"Description[sl]": "Slikovni medpomnilnik na osnovi PipeWire za KRfb.",
|
||||
"Description[sv]": "Rambuffert för Krfb baserad på PipeWire",
|
||||
"Description[uk]": "Буфер кадрів на основі PipeWire для KRfb.",
|
||||
"Description[x-test]": "xxPipeWire based Framebuffer for KRfb.xx",
|
||||
@@ -32,9 +35,10 @@
|
||||
"Id": "pw",
|
||||
"License": "GPL3",
|
||||
"Name": "PipeWire Framebuffer for KRfb",
|
||||
"Name[ca@valencia]": "«Framebuffer» del PipeWire per al KRfb",
|
||||
"Name[ca]": "«Framebuffer» del PipeWire per al KRfb",
|
||||
"Name[ca@valencia]": "«Framebuffer» del «PipeWire» per al KRfb",
|
||||
"Name[ca]": "«Framebuffer» del «PipeWire» per al KRfb",
|
||||
"Name[cs]": "PipeWire Framebuffer pro KRfb",
|
||||
"Name[da]": "PipeWire framebuffer til KRfb",
|
||||
"Name[de]": "PipeWire-Framebuffer für KRfb",
|
||||
"Name[el]": "Μνήμη ανανέωσης pipewire για το KRfb",
|
||||
"Name[en_GB]": "PipeWire Framebuffer for KRfb",
|
||||
@@ -44,6 +48,7 @@
|
||||
"Name[fi]": "KRfb:n PipeWire-kehyspuskuri",
|
||||
"Name[fr]": "Tampon d'images PipeWire pour KRfb",
|
||||
"Name[gl]": "Búfer de fotograma de PipeWire para KRfb",
|
||||
"Name[ia]": "Framebuffer de PipeWire per KRfb",
|
||||
"Name[it]": "Framebuffer PipeWire per KRfb",
|
||||
"Name[ko]": "KRfb용 PipeWire 프레임버퍼",
|
||||
"Name[nl]": "PipeWire-framebuffer voor KRfb",
|
||||
@@ -53,6 +58,7 @@
|
||||
"Name[pt_BR]": "Framebuffer PipeWire para o KRfb",
|
||||
"Name[ru]": "Буфер кадров PipeWire для KRfb",
|
||||
"Name[sk]": "PipeWire Framebuffer pre KRfb",
|
||||
"Name[sl]": "Slikovni medpomnilnik za KRfb na osnovi PipeWire",
|
||||
"Name[sv]": "PipeWire-rambuffert för Krfb",
|
||||
"Name[uk]": "Буфер кадрів PipeWire для KRfb",
|
||||
"Name[x-test]": "xxPipeWire Framebuffer for KRfbxx",
|
||||
|
||||
@@ -13,7 +13,6 @@
|
||||
#include <cstring>
|
||||
|
||||
// Qt
|
||||
#include <QX11Info>
|
||||
#include <QCoreApplication>
|
||||
#include <QGuiApplication>
|
||||
#include <QScreen>
|
||||
@@ -28,6 +27,10 @@
|
||||
|
||||
#if PW_CHECK_VERSION(0, 2, 90)
|
||||
#include <spa/utils/result.h>
|
||||
#ifdef HAVE_LINUX_DMABUF_H
|
||||
#include <linux/dma-buf.h>
|
||||
#endif
|
||||
#include <sys/ioctl.h>
|
||||
#endif
|
||||
|
||||
#include <spa/param/format-utils.h>
|
||||
@@ -36,11 +39,12 @@
|
||||
|
||||
#include <pipewire/pipewire.h>
|
||||
|
||||
#include <limits.h>
|
||||
#include <climits>
|
||||
|
||||
#include "pw_framebuffer.h"
|
||||
#include "xdp_dbus_screencast_interface.h"
|
||||
#include "xdp_dbus_remotedesktop_interface.h"
|
||||
#include "krfb_fb_pipewire_debug.h"
|
||||
|
||||
static const uint MIN_SUPPORTED_XDP_KDE_SC_VERSION = 1;
|
||||
|
||||
@@ -172,10 +176,10 @@ private:
|
||||
struct {
|
||||
quint32 width;
|
||||
quint32 height;
|
||||
} screenGeometry;
|
||||
} screenGeometry = {};
|
||||
|
||||
// Allowed devices
|
||||
uint devices;
|
||||
uint devices = 0;
|
||||
|
||||
// sanity indicator
|
||||
bool isValid = true;
|
||||
@@ -211,15 +215,15 @@ PWFrameBuffer::Private::Private(PWFrameBuffer *q) : q(q)
|
||||
void PWFrameBuffer::Private::initDbus()
|
||||
{
|
||||
qInfo() << "Initializing D-Bus connectivity with XDG Desktop Portal";
|
||||
dbusXdpScreenCastService.reset(new OrgFreedesktopPortalScreenCastInterface(QLatin1String("org.freedesktop.portal.Desktop"),
|
||||
QLatin1String("/org/freedesktop/portal/desktop"),
|
||||
dbusXdpScreenCastService.reset(new OrgFreedesktopPortalScreenCastInterface(QStringLiteral("org.freedesktop.portal.Desktop"),
|
||||
QStringLiteral("/org/freedesktop/portal/desktop"),
|
||||
QDBusConnection::sessionBus()));
|
||||
dbusXdpRemoteDesktopService.reset(new OrgFreedesktopPortalRemoteDesktopInterface(QLatin1String("org.freedesktop.portal.Desktop"),
|
||||
QLatin1String("/org/freedesktop/portal/desktop"),
|
||||
dbusXdpRemoteDesktopService.reset(new OrgFreedesktopPortalRemoteDesktopInterface(QStringLiteral("org.freedesktop.portal.Desktop"),
|
||||
QStringLiteral("/org/freedesktop/portal/desktop"),
|
||||
QDBusConnection::sessionBus()));
|
||||
auto version = dbusXdpScreenCastService->version();
|
||||
if (version < MIN_SUPPORTED_XDP_KDE_SC_VERSION) {
|
||||
qWarning() << "Unsupported XDG Portal screencast interface version:" << version;
|
||||
qCWarning(KRFB_FB_PIPEWIRE) << "Unsupported XDG Portal screencast interface version:" << version;
|
||||
isValid = false;
|
||||
return;
|
||||
}
|
||||
@@ -227,11 +231,11 @@ void PWFrameBuffer::Private::initDbus()
|
||||
// create session
|
||||
auto sessionParameters = QVariantMap {
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(5, 10, 0))
|
||||
{ QLatin1String("session_handle_token"), QStringLiteral("krfb%1").arg(QRandomGenerator::global()->generate()) },
|
||||
{ QLatin1String("handle_token"), QStringLiteral("krfb%1").arg(QRandomGenerator::global()->generate()) }
|
||||
{ QStringLiteral("session_handle_token"), QStringLiteral("krfb%1").arg(QRandomGenerator::global()->generate()) },
|
||||
{ QStringLiteral("handle_token"), QStringLiteral("krfb%1").arg(QRandomGenerator::global()->generate()) }
|
||||
#else
|
||||
{ QLatin1String("session_handle_token"), QStringLiteral("krfb%1").arg(qrand()) },
|
||||
{ QLatin1String("handle_token"), QStringLiteral("krfb%1").arg(qrand()) }
|
||||
{ QStringLiteral("session_handle_token"), QStringLiteral("krfb%1").arg(qrand()) },
|
||||
{ QStringLiteral("handle_token"), QStringLiteral("krfb%1").arg(qrand()) }
|
||||
#endif
|
||||
};
|
||||
auto sessionReply = dbusXdpRemoteDesktopService->CreateSession(sessionParameters);
|
||||
@@ -245,8 +249,8 @@ void PWFrameBuffer::Private::initDbus()
|
||||
qInfo() << "DBus session created: " << sessionReply.value().path();
|
||||
QDBusConnection::sessionBus().connect(QString(),
|
||||
sessionReply.value().path(),
|
||||
QLatin1String("org.freedesktop.portal.Request"),
|
||||
QLatin1String("Response"),
|
||||
QStringLiteral("org.freedesktop.portal.Request"),
|
||||
QStringLiteral("Response"),
|
||||
this->q,
|
||||
SLOT(handleXdpSessionCreated(uint, QVariantMap)));
|
||||
}
|
||||
@@ -266,34 +270,34 @@ void PWFrameBuffer::handleXdpSessionCreated(quint32 code, QVariantMap results)
|
||||
void PWFrameBuffer::Private::handleSessionCreated(quint32 &code, QVariantMap &results)
|
||||
{
|
||||
if (code != 0) {
|
||||
qWarning() << "Failed to create session: " << code;
|
||||
qCWarning(KRFB_FB_PIPEWIRE) << "Failed to create session: " << code;
|
||||
isValid = false;
|
||||
return;
|
||||
}
|
||||
|
||||
sessionPath = QDBusObjectPath(results.value(QLatin1String("session_handle")).toString());
|
||||
sessionPath = QDBusObjectPath(results.value(QStringLiteral("session_handle")).toString());
|
||||
|
||||
// select sources for the session
|
||||
auto selectionOptions = QVariantMap {
|
||||
// We have to specify it's an uint, otherwise xdg-desktop-portal will not forward it to backend implementation
|
||||
{ QLatin1String("types"), QVariant::fromValue<uint>(7) }, // request all (KeyBoard, Pointer, TouchScreen)
|
||||
{ QStringLiteral("types"), QVariant::fromValue<uint>(7) }, // request all (KeyBoard, Pointer, TouchScreen)
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(5, 10, 0))
|
||||
{ QLatin1String("handle_token"), QStringLiteral("krfb%1").arg(QRandomGenerator::global()->generate()) }
|
||||
{ QStringLiteral("handle_token"), QStringLiteral("krfb%1").arg(QRandomGenerator::global()->generate()) }
|
||||
#else
|
||||
{ QLatin1String("handle_token"), QStringLiteral("krfb%1").arg(qrand()) }
|
||||
{ QStringLiteral("handle_token"), QStringLiteral("krfb%1").arg(qrand()) }
|
||||
#endif
|
||||
};
|
||||
auto selectorReply = dbusXdpRemoteDesktopService->SelectDevices(sessionPath, selectionOptions);
|
||||
selectorReply.waitForFinished();
|
||||
if (!selectorReply.isValid()) {
|
||||
qWarning() << "Couldn't select devices for the remote-desktop session";
|
||||
qCWarning(KRFB_FB_PIPEWIRE) << "Couldn't select devices for the remote-desktop session";
|
||||
isValid = false;
|
||||
return;
|
||||
}
|
||||
QDBusConnection::sessionBus().connect(QString(),
|
||||
selectorReply.value().path(),
|
||||
QLatin1String("org.freedesktop.portal.Request"),
|
||||
QLatin1String("Response"),
|
||||
QStringLiteral("org.freedesktop.portal.Request"),
|
||||
QStringLiteral("Response"),
|
||||
this->q,
|
||||
SLOT(handleXdpDevicesSelected(uint, QVariantMap)));
|
||||
}
|
||||
@@ -313,32 +317,32 @@ void PWFrameBuffer::Private::handleDevicesSelected(quint32 &code, QVariantMap &r
|
||||
{
|
||||
Q_UNUSED(results)
|
||||
if (code != 0) {
|
||||
qWarning() << "Failed to select devices: " << code;
|
||||
qCWarning(KRFB_FB_PIPEWIRE) << "Failed to select devices: " << code;
|
||||
isValid = false;
|
||||
return;
|
||||
}
|
||||
|
||||
// select sources for the session
|
||||
auto selectionOptions = QVariantMap {
|
||||
{ QLatin1String("types"), QVariant::fromValue<uint>(1) }, // only MONITOR is supported
|
||||
{ QLatin1String("multiple"), false },
|
||||
{ QStringLiteral("types"), QVariant::fromValue<uint>(1) }, // only MONITOR is supported
|
||||
{ QStringLiteral("multiple"), false },
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(5, 10, 0))
|
||||
{ QLatin1String("handle_token"), QStringLiteral("krfb%1").arg(QRandomGenerator::global()->generate()) }
|
||||
{ QStringLiteral("handle_token"), QStringLiteral("krfb%1").arg(QRandomGenerator::global()->generate()) }
|
||||
#else
|
||||
{ QLatin1String("handle_token"), QStringLiteral("krfb%1").arg(qrand()) }
|
||||
{ QStringLiteral("handle_token"), QStringLiteral("krfb%1").arg(qrand()) }
|
||||
#endif
|
||||
};
|
||||
auto selectorReply = dbusXdpScreenCastService->SelectSources(sessionPath, selectionOptions);
|
||||
selectorReply.waitForFinished();
|
||||
if (!selectorReply.isValid()) {
|
||||
qWarning() << "Couldn't select sources for the screen-casting session";
|
||||
qCWarning(KRFB_FB_PIPEWIRE) << "Couldn't select sources for the screen-casting session";
|
||||
isValid = false;
|
||||
return;
|
||||
}
|
||||
QDBusConnection::sessionBus().connect(QString(),
|
||||
selectorReply.value().path(),
|
||||
QLatin1String("org.freedesktop.portal.Request"),
|
||||
QLatin1String("Response"),
|
||||
QStringLiteral("org.freedesktop.portal.Request"),
|
||||
QStringLiteral("Response"),
|
||||
this->q,
|
||||
SLOT(handleXdpSourcesSelected(uint, QVariantMap)));
|
||||
}
|
||||
@@ -359,7 +363,7 @@ void PWFrameBuffer::handleXdpSourcesSelected(quint32 code, QVariantMap results)
|
||||
void PWFrameBuffer::Private::handleSourcesSelected(quint32 &code, QVariantMap &)
|
||||
{
|
||||
if (code != 0) {
|
||||
qWarning() << "Failed to select sources: " << code;
|
||||
qCWarning(KRFB_FB_PIPEWIRE) << "Failed to select sources: " << code;
|
||||
isValid = false;
|
||||
return;
|
||||
}
|
||||
@@ -367,17 +371,17 @@ void PWFrameBuffer::Private::handleSourcesSelected(quint32 &code, QVariantMap &)
|
||||
// start session
|
||||
auto startParameters = QVariantMap {
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(5, 10, 0))
|
||||
{ QLatin1String("handle_token"), QStringLiteral("krfb%1").arg(QRandomGenerator::global()->generate()) }
|
||||
{ QStringLiteral("handle_token"), QStringLiteral("krfb%1").arg(QRandomGenerator::global()->generate()) }
|
||||
#else
|
||||
{ QLatin1String("handle_token"), QStringLiteral("krfb%1").arg(qrand()) }
|
||||
{ QStringLiteral("handle_token"), QStringLiteral("krfb%1").arg(qrand()) }
|
||||
#endif
|
||||
};
|
||||
auto startReply = dbusXdpRemoteDesktopService->Start(sessionPath, QString(), startParameters);
|
||||
startReply.waitForFinished();
|
||||
QDBusConnection::sessionBus().connect(QString(),
|
||||
startReply.value().path(),
|
||||
QLatin1String("org.freedesktop.portal.Request"),
|
||||
QLatin1String("Response"),
|
||||
QStringLiteral("org.freedesktop.portal.Request"),
|
||||
QStringLiteral("Response"),
|
||||
this->q,
|
||||
SLOT(handleXdpRemoteDesktopStarted(uint, QVariantMap)));
|
||||
}
|
||||
@@ -398,16 +402,16 @@ void PWFrameBuffer::handleXdpRemoteDesktopStarted(quint32 code, QVariantMap resu
|
||||
void PWFrameBuffer::Private::handleRemoteDesktopStarted(quint32 &code, QVariantMap &results)
|
||||
{
|
||||
if (code != 0) {
|
||||
qWarning() << "Failed to start screencast: " << code;
|
||||
qCWarning(KRFB_FB_PIPEWIRE) << "Failed to start screencast: " << code;
|
||||
isValid = false;
|
||||
return;
|
||||
}
|
||||
|
||||
// there should be only one stream
|
||||
Streams streams = qdbus_cast<Streams>(results.value(QLatin1String("streams")));
|
||||
Streams streams = qdbus_cast<Streams>(results.value(QStringLiteral("streams")));
|
||||
if (streams.isEmpty()) {
|
||||
// maybe we should check deeper with qdbus_cast but this suffices for now
|
||||
qWarning() << "Failed to get screencast streams";
|
||||
qCWarning(KRFB_FB_PIPEWIRE) << "Failed to get screencast streams";
|
||||
isValid = false;
|
||||
return;
|
||||
}
|
||||
@@ -415,23 +419,23 @@ void PWFrameBuffer::Private::handleRemoteDesktopStarted(quint32 &code, QVariantM
|
||||
auto streamReply = dbusXdpScreenCastService->OpenPipeWireRemote(sessionPath, QVariantMap());
|
||||
streamReply.waitForFinished();
|
||||
if (!streamReply.isValid()) {
|
||||
qWarning() << "Couldn't open pipewire remote for the screen-casting session";
|
||||
qCWarning(KRFB_FB_PIPEWIRE) << "Couldn't open pipewire remote for the screen-casting session";
|
||||
isValid = false;
|
||||
return;
|
||||
}
|
||||
|
||||
pipewireFd = streamReply.value();
|
||||
if (!pipewireFd.isValid()) {
|
||||
qWarning() << "Couldn't get pipewire connection file descriptor";
|
||||
qCWarning(KRFB_FB_PIPEWIRE) << "Couldn't get pipewire connection file descriptor";
|
||||
isValid = false;
|
||||
return;
|
||||
}
|
||||
|
||||
QSize streamResolution = qdbus_cast<QSize>(streams.first().map.value(QLatin1String("size")));
|
||||
QSize streamResolution = qdbus_cast<QSize>(streams.first().map.value(QStringLiteral("size")));
|
||||
screenGeometry.width = streamResolution.width();
|
||||
screenGeometry.height = streamResolution.height();
|
||||
|
||||
devices = results.value(QLatin1String("types")).toUInt();
|
||||
devices = results.value(QStringLiteral("types")).toUInt();
|
||||
|
||||
pwStreamNodeId = streams.first().nodeId;
|
||||
|
||||
@@ -439,7 +443,7 @@ void PWFrameBuffer::Private::handleRemoteDesktopStarted(quint32 &code, QVariantM
|
||||
q->fb = static_cast<char*>(malloc(screenGeometry.width * screenGeometry.height * 4));
|
||||
|
||||
if (!q->fb) {
|
||||
qWarning() << "Failed to allocate buffer";
|
||||
qCWarning(KRFB_FB_PIPEWIRE) << "Failed to allocate buffer";
|
||||
isValid = false;
|
||||
return;
|
||||
}
|
||||
@@ -463,13 +467,13 @@ void PWFrameBuffer::Private::initPw() {
|
||||
pwMainLoop = pw_thread_loop_new("pipewire-main-loop", nullptr);
|
||||
pwContext = pw_context_new(pw_thread_loop_get_loop(pwMainLoop), nullptr, 0);
|
||||
if (!pwContext) {
|
||||
qWarning() << "Failed to create PipeWire context";
|
||||
qCWarning(KRFB_FB_PIPEWIRE) << "Failed to create PipeWire context";
|
||||
return;
|
||||
}
|
||||
|
||||
pwCore = pw_context_connect(pwContext, nullptr, 0);
|
||||
if (!pwCore) {
|
||||
qWarning() << "Failed to connect PipeWire context";
|
||||
qCWarning(KRFB_FB_PIPEWIRE) << "Failed to connect PipeWire context";
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -477,7 +481,7 @@ void PWFrameBuffer::Private::initPw() {
|
||||
|
||||
pwStream = createReceivingStream();
|
||||
if (!pwStream) {
|
||||
qWarning() << "Failed to create PipeWire stream";
|
||||
qCWarning(KRFB_FB_PIPEWIRE) << "Failed to create PipeWire stream";
|
||||
return;
|
||||
}
|
||||
#else
|
||||
@@ -498,12 +502,12 @@ void PWFrameBuffer::Private::initPw() {
|
||||
#endif
|
||||
|
||||
if (pw_thread_loop_start(pwMainLoop) < 0) {
|
||||
qWarning() << "Failed to start main PipeWire loop";
|
||||
qCWarning(KRFB_FB_PIPEWIRE) << "Failed to start main PipeWire loop";
|
||||
isValid = false;
|
||||
}
|
||||
}
|
||||
|
||||
#if !PW_CHECK_VERSION(0, 2, 9)
|
||||
#if !PW_CHECK_VERSION(0, 2, 90)
|
||||
/**
|
||||
* @brief PWFrameBuffer::Private::initializePwTypes - helper method to initialize and map all needed
|
||||
* Pipewire types from core to type structure.
|
||||
@@ -543,11 +547,11 @@ void PWFrameBuffer::Private::onStateChanged(void *data, pw_remote_state /*old*/,
|
||||
{
|
||||
qInfo() << "remote state: " << pw_remote_state_as_string(state);
|
||||
|
||||
PWFrameBuffer::Private *d = static_cast<PWFrameBuffer::Private*>(data);
|
||||
auto d = static_cast<PWFrameBuffer::Private*>(data);
|
||||
|
||||
switch (state) {
|
||||
case PW_REMOTE_STATE_ERROR:
|
||||
qWarning() << "remote error: " << error;
|
||||
qCWarning(KRFB_FB_PIPEWIRE) << "remote error: " << error;
|
||||
break;
|
||||
case PW_REMOTE_STATE_CONNECTED:
|
||||
d->pwStream = d->createReceivingStream();
|
||||
@@ -574,7 +578,7 @@ void PWFrameBuffer::Private::onStreamStateChanged(void *data, pw_stream_state /*
|
||||
#if PW_CHECK_VERSION(0, 2, 90)
|
||||
switch (state) {
|
||||
case PW_STREAM_STATE_ERROR:
|
||||
qWarning() << "pipewire stream error: " << error_message;
|
||||
qCWarning(KRFB_FB_PIPEWIRE) << "pipewire stream error: " << error_message;
|
||||
break;
|
||||
case PW_STREAM_STATE_PAUSED:
|
||||
pw_stream_set_active(d->pwStream, true);
|
||||
@@ -587,7 +591,7 @@ void PWFrameBuffer::Private::onStreamStateChanged(void *data, pw_stream_state /*
|
||||
#else
|
||||
switch (state) {
|
||||
case PW_STREAM_STATE_ERROR:
|
||||
qWarning() << "pipewire stream error: " << error_message;
|
||||
qCWarning(KRFB_FB_PIPEWIRE) << "pipewire stream error: " << error_message;
|
||||
break;
|
||||
case PW_STREAM_STATE_CONFIGURE:
|
||||
pw_stream_set_active(d->pwStream, true);
|
||||
@@ -688,25 +692,107 @@ void PWFrameBuffer::Private::onStreamProcess(void *data)
|
||||
pw_stream_queue_buffer(d->pwStream, buf);
|
||||
}
|
||||
|
||||
#if PW_CHECK_VERSION(0, 2, 90) && defined(HAVE_LINUX_DMABUF_H)
|
||||
static void syncDmaBuf(int fd, uint64_t start_or_end)
|
||||
{
|
||||
struct dma_buf_sync sync = { 0 };
|
||||
sync.flags = start_or_end | DMA_BUF_SYNC_READ;
|
||||
|
||||
while(true) {
|
||||
int ret;
|
||||
ret = ioctl (fd, DMA_BUF_IOCTL_SYNC, &sync);
|
||||
if (ret == -1 && errno == EINTR) {
|
||||
continue;
|
||||
} else if (ret == -1) {
|
||||
qCWarning(KRFB_FB_PIPEWIRE) << "Failed to synchronize DMA buffer: " << strerror(errno);
|
||||
break;
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
void PWFrameBuffer::Private::handleFrame(pw_buffer *pwBuffer)
|
||||
{
|
||||
auto *spaBuffer = pwBuffer->buffer;
|
||||
void *src = nullptr;
|
||||
void *src = spaBuffer->datas[0].data;
|
||||
|
||||
src = spaBuffer->datas[0].data;
|
||||
if (!src) {
|
||||
#if PW_CHECK_VERSION(0, 2, 90)
|
||||
if (!src && spaBuffer->datas->type != SPA_DATA_DmaBuf) {
|
||||
qCDebug(KRFB_FB_PIPEWIRE) << "discarding null buffer";
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
quint32 maxSize = spaBuffer->datas[0].maxsize;
|
||||
qint32 srcStride = spaBuffer->datas[0].chunk->stride;
|
||||
const quint32 maxSize = spaBuffer->datas[0].maxsize;
|
||||
|
||||
std::function<void()> cleanup;
|
||||
#if PW_CHECK_VERSION(0, 2, 90)
|
||||
#ifdef HAVE_LINUX_DMABUF_H
|
||||
if (spaBuffer->datas->type == SPA_DATA_DmaBuf) {
|
||||
const int fd = spaBuffer->datas[0].fd;
|
||||
auto map = mmap(
|
||||
nullptr, spaBuffer->datas[0].maxsize + spaBuffer->datas[0].mapoffset,
|
||||
PROT_READ, MAP_PRIVATE, fd, 0);
|
||||
if (map == MAP_FAILED) {
|
||||
qCWarning(KRFB_FB_PIPEWIRE) << "Failed to mmap the dmabuf: " << strerror(errno);
|
||||
return;
|
||||
}
|
||||
|
||||
syncDmaBuf(fd, DMA_BUF_SYNC_START);
|
||||
src = SPA_MEMBER(map, spaBuffer->datas[0].mapoffset, uint8_t);
|
||||
|
||||
cleanup = [map, spaBuffer, fd] {
|
||||
syncDmaBuf(fd, DMA_BUF_SYNC_END);
|
||||
munmap(map, spaBuffer->datas[0].maxsize + spaBuffer->datas[0].mapoffset);
|
||||
};
|
||||
} else
|
||||
#endif
|
||||
if (spaBuffer->datas->type == SPA_DATA_MemFd) {
|
||||
uint8_t *map = static_cast<uint8_t*>(mmap(
|
||||
nullptr, spaBuffer->datas->maxsize + spaBuffer->datas->mapoffset,
|
||||
PROT_READ, MAP_PRIVATE, spaBuffer->datas->fd, 0));
|
||||
|
||||
if (map == MAP_FAILED) {
|
||||
qCWarning(KRFB_FB_PIPEWIRE) << "Failed to mmap the memory: " << strerror(errno);
|
||||
return;
|
||||
}
|
||||
src = SPA_MEMBER(map, spaBuffer->datas[0].mapoffset, uint8_t);
|
||||
|
||||
cleanup = [map, spaBuffer] {
|
||||
munmap(map, spaBuffer->datas->maxsize + spaBuffer->datas->mapoffset);
|
||||
};
|
||||
}
|
||||
#endif
|
||||
|
||||
const qint32 srcStride = spaBuffer->datas[0].chunk->stride;
|
||||
if (srcStride != q->paddedWidth()) {
|
||||
qWarning() << "Got buffer with stride different from screen stride" << srcStride << "!=" << q->paddedWidth();
|
||||
qCWarning(KRFB_FB_PIPEWIRE) << "Got buffer with stride different from screen stride" << srcStride << "!=" << q->paddedWidth();
|
||||
return;
|
||||
}
|
||||
|
||||
q->tiles.append(QRect(0, 0, q->width(), q->height()));
|
||||
std::memcpy(q->fb, src, maxSize);
|
||||
cleanup();
|
||||
|
||||
#if PW_CHECK_VERSION(0, 2, 90)
|
||||
if (videoFormat->format == SPA_VIDEO_FORMAT_BGRA || videoFormat->format == SPA_VIDEO_FORMAT_BGRx) {
|
||||
for (uint y = 0; y < videoFormat->size.height; y++) {
|
||||
for (uint x = 0; x < videoFormat->size.width; x++) {
|
||||
uint offset = y * spaBuffer->datas->chunk->stride + x * 4;
|
||||
std::swap(q->fb[offset], q->fb[offset + 2]);
|
||||
}
|
||||
}
|
||||
} else if (videoFormat->format != SPA_VIDEO_FORMAT_RGB) {
|
||||
const QImage::Format format = videoFormat->format == SPA_VIDEO_FORMAT_BGR ? QImage::Format_BGR888
|
||||
: videoFormat->format == SPA_VIDEO_FORMAT_RGBx ? QImage::Format_RGBX8888
|
||||
: QImage::Format_RGB32;
|
||||
|
||||
QImage img((uchar*) q->fb, videoFormat->size.width, videoFormat->size.height, spaBuffer->datas->chunk->stride, format);
|
||||
img.convertTo(QImage::Format_RGB888);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -743,7 +829,10 @@ pw_stream *PWFrameBuffer::Private::createReceivingStream()
|
||||
SPA_TYPE_OBJECT_Format, SPA_PARAM_EnumFormat,
|
||||
SPA_FORMAT_mediaType, SPA_POD_Id(SPA_MEDIA_TYPE_video),
|
||||
SPA_FORMAT_mediaSubtype, SPA_POD_Id(SPA_MEDIA_SUBTYPE_raw),
|
||||
SPA_FORMAT_VIDEO_format, SPA_POD_Id(SPA_VIDEO_FORMAT_RGBx),
|
||||
SPA_FORMAT_VIDEO_format, SPA_POD_CHOICE_ENUM_Id(6,
|
||||
SPA_VIDEO_FORMAT_RGBx, SPA_VIDEO_FORMAT_RGBA,
|
||||
SPA_VIDEO_FORMAT_BGRx, SPA_VIDEO_FORMAT_BGRA,
|
||||
SPA_VIDEO_FORMAT_RGB, SPA_VIDEO_FORMAT_BGR),
|
||||
SPA_FORMAT_VIDEO_size, SPA_POD_CHOICE_RANGE_Rectangle(&pwMaxScreenBounds, &pwMinScreenBounds, &pwMaxScreenBounds),
|
||||
SPA_FORMAT_VIDEO_framerate, SPA_POD_Fraction(&pwFramerateMin),
|
||||
SPA_FORMAT_VIDEO_maxFramerate, SPA_POD_CHOICE_RANGE_Fraction(&pwFramerateMax, &pwFramerateMin, &pwFramerateMax)));
|
||||
@@ -765,7 +854,7 @@ pw_stream *PWFrameBuffer::Private::createReceivingStream()
|
||||
#else
|
||||
if (pw_stream_connect(stream, PW_DIRECTION_INPUT, nullptr, flags, params, 1) != 0) {
|
||||
#endif
|
||||
qWarning() << "Could not connect receiving stream";
|
||||
qCWarning(KRFB_FB_PIPEWIRE) << "Could not connect receiving stream";
|
||||
isValid = false;
|
||||
}
|
||||
|
||||
|
||||
@@ -7,6 +7,14 @@ set (krfb_framebuffer_qt_SRCS
|
||||
qtframebufferplugin.cpp
|
||||
)
|
||||
|
||||
ecm_qt_declare_logging_category(krfb_framebuffer_qt_SRCS
|
||||
HEADER krfb_fb_qt_debug.h
|
||||
IDENTIFIER KRFB_FB_QT
|
||||
CATEGORY_NAME krfb.framebuffer.qt
|
||||
DESCRIPTION "KRFB Qt framebuffer plugin"
|
||||
EXPORT KRFB
|
||||
)
|
||||
|
||||
add_library(krfb_framebuffer_qt
|
||||
MODULE
|
||||
${krfb_framebuffer_qt_SRCS}
|
||||
@@ -20,5 +28,5 @@ target_link_libraries (krfb_framebuffer_qt
|
||||
)
|
||||
|
||||
install (TARGETS krfb_framebuffer_qt
|
||||
DESTINATION ${PLUGIN_INSTALL_DIR}/krfb
|
||||
DESTINATION ${KDE_INSTALL_PLUGINDIR}/krfb
|
||||
)
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
"Description[pt_BR]": "Framebuffer baseado no Qt para o KRfb.",
|
||||
"Description[ru]": "Буфер кадров для KRfb на базе Qt",
|
||||
"Description[sk]": "Framebuffer založený na Qt pre KRfb.",
|
||||
"Description[sl]": "Slikovni medpomnilnik za KRfb, ki temelji na Qt",
|
||||
"Description[sl]": "Slikovni medpomnilnik za KRfb na osnovi Qt.",
|
||||
"Description[sr@ijekavian]": "Кадробафер за КРФБ на основу КуТ‑у",
|
||||
"Description[sr@ijekavianlatin]": "Kadrobafer za KRFB na osnovu Qt‑u",
|
||||
"Description[sr@latin]": "Kadrobafer za KRFB na osnovu Qt‑u",
|
||||
@@ -64,7 +64,7 @@
|
||||
"Name[pt_BR]": "Framebuffer do Qt para o KRfb",
|
||||
"Name[ru]": "Буфер кадров Qt для KRfb",
|
||||
"Name[sk]": "Qt Framebuffer pre KRfb",
|
||||
"Name[sl]": "Slikovni medpomnilnik Qt za KRfb",
|
||||
"Name[sl]": "Slikovni medpomnilnik za KRfb na osnovi Qt",
|
||||
"Name[sr@ijekavian]": "КуТ‑ов кадробафер за КРФБ",
|
||||
"Name[sr@ijekavianlatin]": "Qt‑ov kadrobafer za KRFB",
|
||||
"Name[sr@latin]": "Qt‑ov kadrobafer za KRFB",
|
||||
|
||||
@@ -7,6 +7,14 @@ set (krfb_framebuffer_xcb_SRCS
|
||||
xcb_framebuffer.cpp
|
||||
)
|
||||
|
||||
ecm_qt_declare_logging_category(krfb_framebuffer_xcb_SRCS
|
||||
HEADER krfb_fb_xcb_debug.h
|
||||
IDENTIFIER KRFB_FB_XCB
|
||||
CATEGORY_NAME krfb.framebuffer.xcb
|
||||
DESCRIPTION "KRFB XCB framebuffer plugin"
|
||||
EXPORT KRFB
|
||||
)
|
||||
|
||||
add_library(krfb_framebuffer_xcb MODULE ${krfb_framebuffer_xcb_SRCS})
|
||||
|
||||
target_link_libraries (krfb_framebuffer_xcb
|
||||
@@ -24,5 +32,5 @@ target_link_libraries (krfb_framebuffer_xcb
|
||||
)
|
||||
|
||||
install (TARGETS krfb_framebuffer_xcb
|
||||
DESTINATION ${PLUGIN_INSTALL_DIR}/krfb
|
||||
DESTINATION ${KDE_INSTALL_PLUGINDIR}/krfb
|
||||
)
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
{
|
||||
"KPlugin": {
|
||||
"Description": "X11 XDamage/XShm based Framebuffer for KRfb.",
|
||||
"Description[ca@valencia]": "«Framebuffer» basat en XDamage/XShm de l'X11 per al KRfb.",
|
||||
"Description[ca]": "«Framebuffer» basat en XDamage/XShm de l'X11 per al KRfb.",
|
||||
"Description[ca@valencia]": "«Framebuffer» basat en «XDamage/XShm» de l'X11 per al KRfb.",
|
||||
"Description[ca]": "«Framebuffer» basat en «XDamage/XShm» de l'X11 per al KRfb.",
|
||||
"Description[cs]": "Framebuffer založený na X11 XDamage/XShm pro KRfb.",
|
||||
"Description[da]": "X11 XDamage/XShm-baseret framebuffer til KRfb.",
|
||||
"Description[de]": "X11 XDamage/XShm-basierter Framebuffer für KRfb.",
|
||||
@@ -25,7 +25,7 @@
|
||||
"Description[pt_BR]": "Framebuffer baseado no XDamage/XShm do X11 para o KRfb.",
|
||||
"Description[ru]": "Буфер кадров для KRfb на базе X11 XDamage/XShm",
|
||||
"Description[sk]": "Framebuffer založený na X11 XDamage/XShm pre KRfb.",
|
||||
"Description[sl]": "Slikovni medpomnilnik za KRfb, ki temelji na X11 XDamage/XShm",
|
||||
"Description[sl]": "Slikovni medpomnilnik za KRfb, na osnovi X11 XDamage/XShm.",
|
||||
"Description[sr@ijekavian]": "Кадробафер за КРФБ на основу Икс‑демиџа/Икс‑схма у Иксу11.",
|
||||
"Description[sr@ijekavianlatin]": "Kadrobafer za KRFB na osnovu XDamagea/XShma u X11.",
|
||||
"Description[sr@latin]": "Kadrobafer za KRFB na osnovu XDamagea/XShma u X11.",
|
||||
@@ -64,7 +64,7 @@
|
||||
"Name[pt_BR]": "Framebuffer do X11 para o KRfb",
|
||||
"Name[ru]": "Буфер кадров X11 для KRfb",
|
||||
"Name[sk]": "X11 Framebuffer pre KRfb",
|
||||
"Name[sl]": "Slikovni medpomnilnik X11 za KRfb",
|
||||
"Name[sl]": "Slikovni medpomnilnik za KRfb na osnovi X11",
|
||||
"Name[sr@ijekavian]": "Икс11 кадробафер за КРФБ.",
|
||||
"Name[sr@ijekavianlatin]": "X11 kadrobafer za KRFB.",
|
||||
"Name[sr@latin]": "X11 kadrobafer za KRFB.",
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
*/
|
||||
|
||||
#include "xcb_framebuffer.h"
|
||||
#include "krfb_fb_xcb_debug.h"
|
||||
|
||||
#include <xcb/xcb.h>
|
||||
#include <xcb/xproto.h>
|
||||
@@ -23,7 +24,6 @@
|
||||
#include <QGuiApplication>
|
||||
#include <QScreen>
|
||||
#include <QAbstractNativeEventFilter>
|
||||
#include <QDebug>
|
||||
|
||||
|
||||
class KrfbXCBEventFilter: public QAbstractNativeEventFilter
|
||||
@@ -68,7 +68,7 @@ KrfbXCBEventFilter::KrfbXCBEventFilter(XCBFrameBuffer *owner):
|
||||
}
|
||||
|
||||
#ifdef _DEBUG
|
||||
qDebug() << "xcb framebuffer: XDamage extension version:" <<
|
||||
qCDebug(KRFB_FB_XCB) << "xcb framebuffer: XDamage extension version:" <<
|
||||
xdamage_version->major_version << "." << xdamage_version->minor_version;
|
||||
#endif
|
||||
|
||||
@@ -105,7 +105,7 @@ bool KrfbXCBEventFilter::nativeEventFilter(const QByteArray &eventType,
|
||||
if (xdamageBaseEvent == 0) return false; // no xdamage extension
|
||||
|
||||
if (eventType == "xcb_generic_event_t") {
|
||||
xcb_generic_event_t* ev = static_cast<xcb_generic_event_t *>(message);
|
||||
auto ev = static_cast<xcb_generic_event_t *>(message);
|
||||
if ((ev->response_type & 0x7F) == (xdamageBaseEvent + XCB_DAMAGE_NOTIFY)) {
|
||||
// this is xdamage notification
|
||||
this->fb_owner->handleXDamageNotify(ev);
|
||||
@@ -163,11 +163,15 @@ XCBFrameBuffer::XCBFrameBuffer(WId winid, QObject *parent):
|
||||
|
||||
QScreen *primaryScreen = QGuiApplication::primaryScreen();
|
||||
if (primaryScreen) {
|
||||
qDebug() << "xcb framebuffer: Primary screen: " << primaryScreen->name()
|
||||
qreal scaleFactor = primaryScreen->devicePixelRatio();
|
||||
d->area = { primaryScreen->geometry().topLeft() * scaleFactor,
|
||||
primaryScreen->geometry().bottomRight() * scaleFactor };
|
||||
|
||||
qCDebug(KRFB_FB_XCB) << "xcb framebuffer: Primary screen: " << primaryScreen->name()
|
||||
<< ", geometry: " << primaryScreen->geometry()
|
||||
<< ", device scaling: " << scaleFactor
|
||||
<< ", native size: " << d->area
|
||||
<< ", depth: " << primaryScreen->depth();
|
||||
//
|
||||
d->area = primaryScreen->geometry();
|
||||
} else {
|
||||
qWarning() << "xcb framebuffer: ERROR: Failed to get application's primary screen info!";
|
||||
return;
|
||||
@@ -183,7 +187,7 @@ XCBFrameBuffer::XCBFrameBuffer(WId winid, QObject *parent):
|
||||
XCB_IMAGE_FORMAT_Z_PIXMAP);
|
||||
if (d->framebufferImage) {
|
||||
#ifdef _DEBUG
|
||||
qDebug() << "xcb framebuffer: Got primary screen image. bpp: " << d->framebufferImage->bpp
|
||||
qCDebug(KRFB_FB_XCB) << "xcb framebuffer: Got primary screen image. bpp: " << d->framebufferImage->bpp
|
||||
<< ", size (" << d->framebufferImage->width << d->framebufferImage->height << ")"
|
||||
<< ", depth: " << d->framebufferImage->depth
|
||||
<< ", padded width: " << d->framebufferImage->stride;
|
||||
@@ -211,15 +215,15 @@ XCBFrameBuffer::XCBFrameBuffer(WId winid, QObject *parent):
|
||||
nullptr); // data = 0
|
||||
if (d->updateTile) {
|
||||
#ifdef _DEBUG
|
||||
qDebug() << "xcb framebuffer: Successfully created new empty image in native format";
|
||||
qDebug() << " size: " << d->updateTile->width << "x" << d->updateTile->height
|
||||
<< "(stride: " << d->updateTile->stride << ")";
|
||||
qDebug() << " bpp, depth: " << d->updateTile->bpp << d->updateTile->depth; // 32, 24
|
||||
qDebug() << " addr of base, data: " << d->updateTile->base << (void *)d->updateTile->data;
|
||||
qDebug() << " size: " << d->updateTile->size;
|
||||
qDebug() << " image byte order = " << d->updateTile->byte_order; // == 0 .._LSB_FIRST
|
||||
qDebug() << " image bit order = " << d->updateTile->bit_order; // == 1 .._MSB_FIRST
|
||||
qDebug() << " image plane_mask = " << d->updateTile->plane_mask; // == 16777215 == 0x00FFFFFF
|
||||
qCDebug(KRFB_FB_XCB) << "xcb framebuffer: Successfully created new empty image in native format"
|
||||
<< "\n size: " << d->updateTile->width << "x" << d->updateTile->height
|
||||
<< "(stride: " << d->updateTile->stride << ")"
|
||||
<< "\n bpp, depth: " << d->updateTile->bpp << d->updateTile->depth // 32, 24
|
||||
<< "\n addr of base, data: " << d->updateTile->base << (void *)d->updateTile->data
|
||||
<< "\n size: " << d->updateTile->size
|
||||
<< "\n image byte order = " << d->updateTile->byte_order // == 0 .._LSB_FIRST
|
||||
<< "\n image bit order = " << d->updateTile->bit_order // == 1 .._MSB_FIRST
|
||||
<< "\n image plane_mask = " << d->updateTile->plane_mask; // == 16777215 == 0x00FFFFFF
|
||||
#endif
|
||||
|
||||
// allocate shared memory block only once, make its size large enough
|
||||
@@ -237,7 +241,7 @@ XCBFrameBuffer::XCBFrameBuffer(WId winid, QObject *parent):
|
||||
xcb_shm_attach(QX11Info::connection(), d->shminfo.shmseg, d->shminfo.shmid, 0);
|
||||
|
||||
#ifdef _DEBUG
|
||||
qDebug() << " shm id: " << d->shminfo.shmseg << ", addr: " << (void *)d->shminfo.shmaddr;
|
||||
qCDebug(KRFB_FB_XCB) << " shm id: " << d->shminfo.shmseg << ", addr: " << (void *)d->shminfo.shmaddr;
|
||||
#endif
|
||||
|
||||
// will return 1 on success (yes!)
|
||||
@@ -273,7 +277,7 @@ XCBFrameBuffer::XCBFrameBuffer(WId winid, QObject *parent):
|
||||
}
|
||||
|
||||
#ifdef _DEBUG
|
||||
qDebug() << "xcb framebuffer: XCBFrameBuffer(), xshm base event = " << d->x11EvtFilter->xshmBaseEvent
|
||||
qCDebug(KRFB_FB_XCB) << "xcb framebuffer: XCBFrameBuffer(), xshm base event = " << d->x11EvtFilter->xshmBaseEvent
|
||||
<< ", xshm base error = " << d->x11EvtFilter->xdamageBaseError
|
||||
<< ", xdamage base event = " << d->x11EvtFilter->xdamageBaseEvent
|
||||
<< ", xdamage base error = " << d->x11EvtFilter->xdamageBaseError;
|
||||
@@ -420,10 +424,12 @@ void XCBFrameBuffer::getServerFormat(rfbPixelFormat &format) {
|
||||
format.blueMax = root_visualtype->blue_mask >> format.blueShift;
|
||||
|
||||
#ifdef _DEBUG
|
||||
qDebug() << " Calculated redShift =" << (int)format.redShift;
|
||||
qDebug() << " Calculated greenShift =" << (int)format.greenShift;
|
||||
qDebug() << " Calculated blueShift =" << (int)format.blueShift;
|
||||
qDebug( " Calculated max values: R%d G%d B%d",
|
||||
qCDebug(KRFB_FB_XCB,
|
||||
" Calculated redShift = %d\n"
|
||||
" Calculated greenShift = %d\n"
|
||||
" Calculated blueShift = %d\n"
|
||||
" Calculated max values: R%d G%d B%d",
|
||||
format.redShift, format.greenShift, format.blueShift
|
||||
format.redMax, format.greenMax, format.blueMax);
|
||||
#endif
|
||||
} else {
|
||||
@@ -477,10 +483,10 @@ void XCBFrameBuffer::cleanupRects() {
|
||||
QRect ri = r.intersected(d->area);
|
||||
|
||||
if (tiles.size() > 0) {
|
||||
for (int i = 0; i < tiles.size(); i++) {
|
||||
// if current rect has intersection with tiles[i], unite them
|
||||
if (ri.intersects(tiles[i])) {
|
||||
tiles[i] |= ri;
|
||||
for (auto &tile : tiles) {
|
||||
// if current rect has intersection with tile, unite them
|
||||
if (ri.intersects(tile)) {
|
||||
tile |= ri;
|
||||
inserted = true;
|
||||
break;
|
||||
}
|
||||
@@ -498,25 +504,25 @@ void XCBFrameBuffer::cleanupRects() {
|
||||
|
||||
// increase all rectangles size by 30 pixels each side.
|
||||
// limit coordinates to primary monitor boundaries.
|
||||
for (int i = 0; i < tiles.size(); i++) {
|
||||
tiles[i].adjust(-30, -30, 30, 30);
|
||||
if (tiles[i].top() < d->area.top()) {
|
||||
tiles[i].setTop(d->area.top());
|
||||
for (auto &tile : tiles) {
|
||||
tile.adjust(-30, -30, 30, 30);
|
||||
if (tile.top() < d->area.top()) {
|
||||
tile.setTop(d->area.top());
|
||||
}
|
||||
if (tiles[i].bottom() > d->area.bottom()) {
|
||||
tiles[i].setBottom(d->area.bottom());
|
||||
if (tile.bottom() > d->area.bottom()) {
|
||||
tile.setBottom(d->area.bottom());
|
||||
}
|
||||
//
|
||||
if (tiles[i].left() < d->area.left()) {
|
||||
tiles[i].setLeft(d->area.left());
|
||||
if (tile.left() < d->area.left()) {
|
||||
tile.setLeft(d->area.left());
|
||||
}
|
||||
if (tiles[i].right() > d->area.right()) {
|
||||
tiles[i].setRight(d->area.right());
|
||||
if (tile.right() > d->area.right()) {
|
||||
tile.setRight(d->area.right());
|
||||
}
|
||||
// move update rects so that they are positioned relative to
|
||||
// framebuffer image, not whole screen
|
||||
tiles[i].moveTo(tiles[i].left() - d->area.left(),
|
||||
tiles[i].top() - d->area.top());
|
||||
tile.moveTo(tile.left() - d->area.left(),
|
||||
tile.top() - d->area.top());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -676,7 +682,7 @@ void XCBFrameBuffer::stopMonitor() {
|
||||
|
||||
|
||||
void XCBFrameBuffer::handleXDamageNotify(xcb_generic_event_t *xevent) {
|
||||
xcb_damage_notify_event_t *xdevt = (xcb_damage_notify_event_t *)xevent;
|
||||
auto xdevt = (xcb_damage_notify_event_t *)xevent;
|
||||
|
||||
QRect r((int)xdevt->area.x, (int)xdevt->area.y,
|
||||
(int)xdevt->area.width, (int)xdevt->area.height);
|
||||
|
||||
@@ -36,14 +36,14 @@ set_target_properties (krfbprivate PROPERTIES
|
||||
)
|
||||
|
||||
install (TARGETS krfbprivate
|
||||
${INSTALL_TARGETS_DEFAULT_ARGS}
|
||||
${KDE_INSTALL_TARGETS_DEFAULT_ARGS}
|
||||
LIBRARY NAMELINK_SKIP
|
||||
)
|
||||
|
||||
install (FILES
|
||||
krfb-framebuffer.desktop
|
||||
krfb-events.desktop
|
||||
DESTINATION ${SERVICETYPES_INSTALL_DIR}
|
||||
DESTINATION ${KDE_INSTALL_KSERVICETYPES5DIR}
|
||||
)
|
||||
|
||||
#####################################
|
||||
@@ -66,6 +66,14 @@ set (krfb_SRCS
|
||||
invitationsrfbclient.cpp
|
||||
)
|
||||
|
||||
ecm_qt_declare_logging_category(krfb_SRCS
|
||||
HEADER krfbdebug.h
|
||||
IDENTIFIER KRFB
|
||||
CATEGORY_NAME krfb.krfb
|
||||
DESCRIPTION "KRFB Application"
|
||||
EXPORT KRFB
|
||||
)
|
||||
|
||||
kconfig_add_kcfg_files (krfb_SRCS
|
||||
krfbconfig.kcfgc
|
||||
)
|
||||
@@ -93,7 +101,6 @@ target_link_libraries (krfb
|
||||
${X11_X11_LIB}
|
||||
${X11_Xdamage_LIB}
|
||||
Qt5::Network
|
||||
KF5::Completion
|
||||
KF5::CoreAddons
|
||||
KF5::DBusAddons
|
||||
KF5::DNSSD
|
||||
@@ -113,13 +120,13 @@ if (X11_XTest_FOUND)
|
||||
endif (X11_XTest_FOUND)
|
||||
|
||||
install (TARGETS krfb
|
||||
${INSTALL_TARGETS_DEFAULT_ARGS}
|
||||
${KDE_INSTALL_TARGETS_DEFAULT_ARGS}
|
||||
)
|
||||
|
||||
########### install files ###############
|
||||
|
||||
install (PROGRAMS org.kde.krfb.desktop
|
||||
DESTINATION ${XDG_APPS_INSTALL_DIR}
|
||||
DESTINATION ${KDE_INSTALL_APPDIR}
|
||||
)
|
||||
|
||||
install(FILES org.kde.krfb.appdata.xml
|
||||
@@ -127,6 +134,6 @@ install(FILES org.kde.krfb.appdata.xml
|
||||
)
|
||||
|
||||
install (FILES krfb.notifyrc
|
||||
DESTINATION ${DATA_INSTALL_DIR}/krfb
|
||||
DESTINATION ${KDE_INSTALL_DATADIR}/krfb
|
||||
)
|
||||
|
||||
|
||||
@@ -23,8 +23,8 @@
|
||||
#include "eventsplugin.h"
|
||||
#include "krfbconfig.h"
|
||||
#include "rfbservermanager.h"
|
||||
#include "krfbdebug.h"
|
||||
|
||||
#include <QDebug>
|
||||
#include <QGlobalStatic>
|
||||
|
||||
#include <KPluginFactory>
|
||||
@@ -79,18 +79,18 @@ void EventsManager::loadPlugins()
|
||||
KPluginFactory *factory = KPluginLoader(data.fileName()).factory();
|
||||
|
||||
if (!factory) {
|
||||
qDebug() << "KPluginFactory could not load the plugin:" << data.fileName();
|
||||
qCDebug(KRFB) << "KPluginFactory could not load the plugin:" << data.fileName();
|
||||
continue;
|
||||
} else {
|
||||
qDebug() << "found plugin at " << data.fileName();
|
||||
qCDebug(KRFB) << "found plugin at " << data.fileName();
|
||||
}
|
||||
|
||||
EventsPlugin *plugin = factory->create<EventsPlugin>(this);
|
||||
auto plugin = factory->create<EventsPlugin>(this);
|
||||
if (plugin) {
|
||||
m_plugins.insert(data.pluginId(), plugin);
|
||||
qDebug() << "Loaded plugin with name " << data.pluginId();
|
||||
qCDebug(KRFB) << "Loaded plugin with name " << data.pluginId();
|
||||
} else {
|
||||
qDebug() << "unable to load plugin for " << data.fileName();
|
||||
qCDebug(KRFB) << "unable to load plugin for " << data.fileName();
|
||||
}
|
||||
unique.insert (data.name());
|
||||
}
|
||||
@@ -113,6 +113,6 @@ QSharedPointer<EventHandler> EventsManager::eventHandler()
|
||||
}
|
||||
|
||||
// No valid events plugin found.
|
||||
qDebug() << "No valid event handlers found. returning null.";
|
||||
qCDebug(KRFB) << "No valid event handlers found. returning null.";
|
||||
return QSharedPointer<EventHandler>();
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@ Q_SIGNALS:
|
||||
|
||||
protected:
|
||||
WId win;
|
||||
char *fb;
|
||||
char *fb = nullptr;
|
||||
QList<QRect> tiles;
|
||||
|
||||
private:
|
||||
|
||||
@@ -22,8 +22,8 @@
|
||||
|
||||
#include "framebufferplugin.h"
|
||||
#include "krfbconfig.h"
|
||||
#include "krfbdebug.h"
|
||||
|
||||
#include <QDebug>
|
||||
#include <QGlobalStatic>
|
||||
|
||||
#include <KPluginFactory>
|
||||
@@ -78,18 +78,18 @@ void FrameBufferManager::loadPlugins()
|
||||
KPluginFactory *factory = KPluginLoader(data.fileName()).factory();
|
||||
|
||||
if (!factory) {
|
||||
qDebug() << "KPluginFactory could not load the plugin:" << data.fileName();
|
||||
qCDebug(KRFB) << "KPluginFactory could not load the plugin:" << data.fileName();
|
||||
continue;
|
||||
} else {
|
||||
qDebug() << "found plugin at " << data.fileName();
|
||||
qCDebug(KRFB) << "found plugin at " << data.fileName();
|
||||
}
|
||||
|
||||
FrameBufferPlugin *plugin = factory->create<FrameBufferPlugin>(this);
|
||||
auto plugin = factory->create<FrameBufferPlugin>(this);
|
||||
if (plugin) {
|
||||
m_plugins.insert(data.pluginId(), plugin);
|
||||
qDebug() << "Loaded plugin with name " << data.pluginId();
|
||||
qCDebug(KRFB) << "Loaded plugin with name " << data.pluginId();
|
||||
} else {
|
||||
qDebug() << "unable to load pluign for " << data.fileName();
|
||||
qCDebug(KRFB) << "unable to load plugin for " << data.fileName();
|
||||
}
|
||||
unique.insert (data.name());
|
||||
}
|
||||
@@ -118,7 +118,7 @@ QSharedPointer<FrameBuffer> FrameBufferManager::frameBuffer(WId id)
|
||||
while (iter != m_plugins.constEnd()) {
|
||||
|
||||
if (iter.key() == KrfbConfig::preferredFrameBufferPlugin()) {
|
||||
qDebug() << "Using FrameBuffer:" << KrfbConfig::preferredFrameBufferPlugin();
|
||||
qCDebug(KRFB) << "Using FrameBuffer:" << KrfbConfig::preferredFrameBufferPlugin();
|
||||
|
||||
QSharedPointer<FrameBuffer> frameBuffer(iter.value()->frameBuffer(id));
|
||||
|
||||
@@ -133,6 +133,6 @@ QSharedPointer<FrameBuffer> FrameBufferManager::frameBuffer(WId id)
|
||||
}
|
||||
|
||||
// No valid framebuffer plugin found.
|
||||
qDebug() << "No valid framebuffer found. returning null.";
|
||||
qCDebug(KRFB) << "No valid framebuffer found. returning null.";
|
||||
return QSharedPointer<FrameBuffer>();
|
||||
}
|
||||
|
||||
@@ -24,11 +24,11 @@
|
||||
#include "krfbconfig.h"
|
||||
#include "sockethelpers.h"
|
||||
#include "connectiondialog.h"
|
||||
#include "krfbdebug.h"
|
||||
|
||||
#include <KNotification>
|
||||
#include <KLocalizedString>
|
||||
|
||||
#include <QDebug>
|
||||
#include <QSocketNotifier>
|
||||
#include <poll.h>
|
||||
#include <KConfigGroup>
|
||||
@@ -41,7 +41,7 @@ struct PendingInvitationsRfbClient::Private
|
||||
{}
|
||||
|
||||
rfbClientPtr client;
|
||||
QSocketNotifier *notifier;
|
||||
QSocketNotifier *notifier = nullptr;
|
||||
bool askOnConnect;
|
||||
};
|
||||
|
||||
@@ -79,7 +79,7 @@ void PendingInvitationsRfbClient::processNewClient()
|
||||
i18n("Received connection from %1, on hold (waiting for confirmation)",
|
||||
host));
|
||||
|
||||
InvitationsConnectionDialog *dialog = new InvitationsConnectionDialog(nullptr);
|
||||
auto dialog = new InvitationsConnectionDialog(nullptr);
|
||||
dialog->setRemoteHost(host);
|
||||
dialog->setAllowRemoteControl(KrfbConfig::allowDesktopControl());
|
||||
|
||||
@@ -115,7 +115,7 @@ void PendingInvitationsRfbClient::onSocketActivated()
|
||||
//the clientGoneHook which in turn will remove this RfbClient instance
|
||||
//from the server manager and will call deleteLater() to delete it
|
||||
if (d->client->sock == -1) {
|
||||
qDebug() << "disconnected from socket signal";
|
||||
qCDebug(KRFB) << "disconnected from socket signal";
|
||||
d->notifier->setEnabled(false);
|
||||
rfbClientConnectionGone(d->client);
|
||||
break;
|
||||
@@ -125,7 +125,7 @@ void PendingInvitationsRfbClient::onSocketActivated()
|
||||
|
||||
bool PendingInvitationsRfbClient::checkPassword(const QByteArray & encryptedPassword)
|
||||
{
|
||||
qDebug() << "about to start authentication";
|
||||
qCDebug(KRFB) << "about to start authentication";
|
||||
|
||||
if(InvitationsRfbServer::instance->allowUnattendedAccess() && vncAuthCheckPassword(
|
||||
InvitationsRfbServer::instance->unattendedPassword().toLocal8Bit(),
|
||||
@@ -141,10 +141,10 @@ bool PendingInvitationsRfbClient::checkPassword(const QByteArray & encryptedPass
|
||||
|
||||
void PendingInvitationsRfbClient::dialogAccepted()
|
||||
{
|
||||
InvitationsConnectionDialog *dialog = qobject_cast<InvitationsConnectionDialog *>(sender());
|
||||
auto dialog = qobject_cast<InvitationsConnectionDialog *>(sender());
|
||||
Q_ASSERT(dialog);
|
||||
|
||||
InvitationsRfbClient *client = new InvitationsRfbClient(m_rfbClient, parent());
|
||||
auto client = new InvitationsRfbClient(m_rfbClient, parent());
|
||||
client->setControlEnabled(dialog->allowRemoteControl());
|
||||
accept(client);
|
||||
}
|
||||
|
||||
@@ -22,20 +22,23 @@
|
||||
#include "invitationsrfbclient.h"
|
||||
#include "krfbconfig.h"
|
||||
#include "rfbservermanager.h"
|
||||
#include "krfbdebug.h"
|
||||
#include <QTimer>
|
||||
#include <QApplication>
|
||||
#include <QHostInfo>
|
||||
#include <QDebug>
|
||||
#include <QRandomGenerator>
|
||||
|
||||
#include <KLocalizedString>
|
||||
#include <KUser>
|
||||
#include <KRandom>
|
||||
#include <KStringHandler>
|
||||
#include <KWallet/KWallet>
|
||||
|
||||
#include <dnssd/publicservice.h>
|
||||
using KWallet::Wallet;
|
||||
|
||||
// used for KWallet folder name
|
||||
static const QString s_krfbFolderName(QStringLiteral("krfb"));
|
||||
|
||||
//static
|
||||
InvitationsRfbServer *InvitationsRfbServer::instance;
|
||||
|
||||
@@ -69,6 +72,9 @@ const QString& InvitationsRfbServer::desktopPassword() const
|
||||
void InvitationsRfbServer::setDesktopPassword(const QString& password)
|
||||
{
|
||||
m_desktopPassword = password;
|
||||
// this is called from GUI every time desktop password is edited.
|
||||
// make sure we save settings immediately each time
|
||||
saveSecuritySettings();
|
||||
}
|
||||
|
||||
const QString& InvitationsRfbServer::unattendedPassword() const
|
||||
@@ -79,6 +85,9 @@ const QString& InvitationsRfbServer::unattendedPassword() const
|
||||
void InvitationsRfbServer::setUnattendedPassword(const QString& password)
|
||||
{
|
||||
m_unattendedPassword = password;
|
||||
// this is called from GUI every time unattended password is edited.
|
||||
// make sure we save settings immediately each time
|
||||
saveSecuritySettings();
|
||||
}
|
||||
|
||||
bool InvitationsRfbServer::allowUnattendedAccess() const
|
||||
@@ -106,6 +115,9 @@ void InvitationsRfbServer::stop()
|
||||
void InvitationsRfbServer::toggleUnattendedAccess(bool allow)
|
||||
{
|
||||
m_allowUnattendedAccess = allow;
|
||||
// this is called from GUI every time unattended access is toggled.
|
||||
// make sure we save settings immediately each time
|
||||
saveSecuritySettings();
|
||||
}
|
||||
|
||||
InvitationsRfbServer::InvitationsRfbServer()
|
||||
@@ -120,19 +132,11 @@ InvitationsRfbServer::InvitationsRfbServer()
|
||||
InvitationsRfbServer::~InvitationsRfbServer()
|
||||
{
|
||||
InvitationsRfbServer::stop(); // calling virtual funcs in destructor is bad
|
||||
|
||||
KConfigGroup krfbConfig(KSharedConfig::openConfig(), "Security");
|
||||
krfbConfig.writeEntry("allowUnattendedAccess", m_allowUnattendedAccess);
|
||||
|
||||
saveSecuritySettings();
|
||||
// ^^ also saves passwords in kwallet,
|
||||
// do it before closing kwallet
|
||||
if (!KrfbConfig::noWallet() && m_wallet) {
|
||||
closeKWallet();
|
||||
} else {
|
||||
krfbConfig.writeEntry("desktopPassword",
|
||||
KStringHandler::obscure(m_desktopPassword));
|
||||
krfbConfig.writeEntry("unattendedPassword",
|
||||
KStringHandler::obscure(m_unattendedPassword));
|
||||
krfbConfig.writeEntry("allowUnattendedAccess",
|
||||
m_allowUnattendedAccess);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -153,13 +157,6 @@ void InvitationsRfbServer::openKWallet()
|
||||
void InvitationsRfbServer::closeKWallet()
|
||||
{
|
||||
if (m_wallet && m_wallet->isOpen()) {
|
||||
const QString krfbFolderName = QStringLiteral("krfb");
|
||||
if ((m_wallet->currentFolder() == krfbFolderName) ||
|
||||
((m_wallet->hasFolder(krfbFolderName) || m_wallet->createFolder(krfbFolderName)) &&
|
||||
m_wallet->setFolder(krfbFolderName)) ) {
|
||||
m_wallet->writePassword(QStringLiteral("desktopSharingPassword"), m_desktopPassword);
|
||||
m_wallet->writePassword(QStringLiteral("unattendedAccessPassword"), m_unattendedPassword);
|
||||
}
|
||||
delete m_wallet; // closes the wallet
|
||||
m_wallet = nullptr;
|
||||
}
|
||||
@@ -170,25 +167,22 @@ void InvitationsRfbServer::walletOpened(bool opened)
|
||||
QString desktopPassword;
|
||||
QString unattendedPassword;
|
||||
Q_ASSERT(m_wallet);
|
||||
const QString krfbFolderName = QStringLiteral("krfb");
|
||||
if( opened &&
|
||||
( m_wallet->hasFolder(krfbFolderName) || m_wallet->createFolder(krfbFolderName) ) &&
|
||||
m_wallet->setFolder(krfbFolderName) ) {
|
||||
|
||||
if(m_wallet->readPassword(QStringLiteral("desktopSharingPassword"), desktopPassword)==0 &&
|
||||
if (opened && m_wallet->hasFolder(s_krfbFolderName) && m_wallet->setFolder(s_krfbFolderName) ) {
|
||||
if (m_wallet->readPassword(QStringLiteral("desktopSharingPassword"), desktopPassword) == 0 &&
|
||||
!desktopPassword.isEmpty()) {
|
||||
m_desktopPassword = desktopPassword;
|
||||
emit passwordChanged(m_desktopPassword);
|
||||
}
|
||||
|
||||
if(m_wallet->readPassword(QStringLiteral("unattendedAccessPassword"), unattendedPassword)==0 &&
|
||||
if(m_wallet->readPassword(QStringLiteral("unattendedAccessPassword"), unattendedPassword) == 0 &&
|
||||
!unattendedPassword.isEmpty()) {
|
||||
m_unattendedPassword = unattendedPassword;
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
qDebug() << "Could not open KWallet, Falling back to config file";
|
||||
qCDebug(KRFB) << "Could not open KWallet, Falling back to config file";
|
||||
KConfigGroup krfbConfig(KSharedConfig::openConfig(),"Security");
|
||||
|
||||
desktopPassword = KStringHandler::obscure(krfbConfig.readEntry(
|
||||
@@ -213,7 +207,7 @@ QString InvitationsRfbServer::readableRandomString(int length)
|
||||
{
|
||||
QString str;
|
||||
while (length) {
|
||||
int r = KRandom::random() % 62;
|
||||
int r = QRandomGenerator::global()->bounded(62);
|
||||
r += 48;
|
||||
if (r > 57) {
|
||||
r += 7;
|
||||
@@ -236,3 +230,31 @@ QString InvitationsRfbServer::readableRandomString(int length)
|
||||
}
|
||||
return str;
|
||||
}
|
||||
|
||||
// one place to deal with all security configuration
|
||||
void InvitationsRfbServer::saveSecuritySettings()
|
||||
{
|
||||
KConfigGroup secConfigGroup(KSharedConfig::openConfig(), "Security");
|
||||
secConfigGroup.writeEntry("allowUnattendedAccess", m_allowUnattendedAccess);
|
||||
if (KrfbConfig::noWallet()) {
|
||||
// save passwords in config file only if not using kwallet integration
|
||||
secConfigGroup.writeEntry("desktopPassword", KStringHandler::obscure(m_desktopPassword));
|
||||
secConfigGroup.writeEntry("unattendedPassword", KStringHandler::obscure(m_unattendedPassword));
|
||||
} else {
|
||||
// using KWallet, erase possibly stored passwords from krfbrc file
|
||||
secConfigGroup.deleteEntry("desktopPassword");
|
||||
secConfigGroup.deleteEntry("unattendedPassword");
|
||||
// update passwords in kwallet
|
||||
if (m_wallet && m_wallet->isOpen()) {
|
||||
if (!m_wallet->hasFolder(s_krfbFolderName)) {
|
||||
m_wallet->createFolder(s_krfbFolderName);
|
||||
}
|
||||
if (m_wallet->currentFolder() != s_krfbFolderName) {
|
||||
m_wallet->setFolder(s_krfbFolderName);
|
||||
}
|
||||
m_wallet->writePassword(QStringLiteral("desktopSharingPassword"), m_desktopPassword);
|
||||
m_wallet->writePassword(QStringLiteral("unattendedAccessPassword"), m_unattendedPassword);
|
||||
}
|
||||
}
|
||||
KrfbConfig::self()->save();
|
||||
}
|
||||
|
||||
@@ -52,6 +52,7 @@ public Q_SLOTS:
|
||||
void toggleUnattendedAccess(bool allow);
|
||||
void openKWallet();
|
||||
void closeKWallet();
|
||||
void saveSecuritySettings();
|
||||
|
||||
protected:
|
||||
InvitationsRfbServer();
|
||||
@@ -62,11 +63,11 @@ private Q_SLOTS:
|
||||
void walletOpened(bool);
|
||||
|
||||
private:
|
||||
KDNSSD::PublicService *m_publicService;
|
||||
KDNSSD::PublicService *m_publicService = nullptr;
|
||||
bool m_allowUnattendedAccess;
|
||||
QString m_desktopPassword;
|
||||
QString m_unattendedPassword;
|
||||
KWallet::Wallet *m_wallet;
|
||||
KWallet::Wallet *m_wallet = nullptr;
|
||||
|
||||
QString readableRandomString(int);
|
||||
Q_DISABLE_COPY(InvitationsRfbServer)
|
||||
|
||||
@@ -6,6 +6,7 @@ Comment=Event plugins for KRfb
|
||||
Comment[ca]=Connectors d'esdeveniments per al KRfb.
|
||||
Comment[ca@valencia]=Connectors d'esdeveniments per al KRfb.
|
||||
Comment[cs]=Moduly událostí pro KRfb
|
||||
Comment[da]=Hændelses-plugins til KRfb
|
||||
Comment[de]=Ereignis-Module für KRfb
|
||||
Comment[el]=Πρόσθετα γεγονότων για το KRfb
|
||||
Comment[en_GB]=Event plugins for KRfb
|
||||
@@ -13,8 +14,9 @@ Comment[es]=Complementos de eventos para KRfb
|
||||
Comment[et]=KRfb sündmuste pluginad
|
||||
Comment[eu]=KRfb-rako gertaeren pluginak
|
||||
Comment[fi]=KRfb:n tapahtumaliitännäinen
|
||||
Comment[fr]=Modules externes d'événements pour Krfb
|
||||
Comment[fr]=Modules externes d'évènements pour Krfb
|
||||
Comment[gl]=Complementos de eventos para KRfb
|
||||
Comment[ia]=Plug-ins de evento per KRfb
|
||||
Comment[it]=Estensioni degli eventi per KRfb
|
||||
Comment[ko]=KRfb 이벤트 플러그인
|
||||
Comment[nl]=Plug-ins voor gebeurtenis voor KRfb
|
||||
@@ -23,6 +25,7 @@ Comment[pl]=Wtyczki wydarzeń dla KRfb
|
||||
Comment[pt]='Plugins' de eventos para o KRfb
|
||||
Comment[pt_BR]=Plugins de evento para o KRfb
|
||||
Comment[sk]=Doplnky udalostí pre KRfb
|
||||
Comment[sl]=Vstavki dogodkov za KRFB
|
||||
Comment[sv]=Händelseinsticksprogram för Krfb
|
||||
Comment[uk]=Додатки обробки подій для KRfb
|
||||
Comment[x-test]=xxEvent plugins for KRfbxx
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
"Description[ca@valencia]": "Connectors d'esdeveniments per al KRfb.",
|
||||
"Description[ca]": "Connectors d'esdeveniments per al KRfb.",
|
||||
"Description[cs]": "Moduly událostí pro KRfb",
|
||||
"Description[da]": "Hændelses-plugins til KRfb",
|
||||
"Description[de]": "Ereignis-Module für KRfb",
|
||||
"Description[el]": "Πρόσθετα γεγονότων για το KRfb",
|
||||
"Description[en_GB]": "Events plugins for KRfb",
|
||||
@@ -13,6 +14,7 @@
|
||||
"Description[fi]": "KRfb:n tapahtumaliitännäinen",
|
||||
"Description[fr]": "Modules externes d'évènements pour KRfb",
|
||||
"Description[gl]": "Complementos de eventos para KRfb",
|
||||
"Description[ia]": "Plug-ins de eventos per KRfb",
|
||||
"Description[it]": "Estensioni degli eventi per KRfb",
|
||||
"Description[ko]": "KRfb 이벤트 플러그인",
|
||||
"Description[nl]": "Plug-ins voor gebeurtenis voor KRfb",
|
||||
@@ -21,6 +23,7 @@
|
||||
"Description[pt]": "'Plugins' de eventos para o KRfb",
|
||||
"Description[pt_BR]": "Plugins de evento para o KRfb",
|
||||
"Description[sk]": "Doplnky udalostí pre KRfb",
|
||||
"Description[sl]": "Vtičniki za dogodke za KRfb",
|
||||
"Description[sv]": "Händelseinsticksprogram för Krfb",
|
||||
"Description[uk]": "Додатки обробки подій для KRfb",
|
||||
"Description[x-test]": "xxEvents plugins for KRfbxx",
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
"Description[pt_BR]": "Plugins de framebuffers para o KRfb",
|
||||
"Description[ru]": "Модули буфера кадров для KRfb",
|
||||
"Description[sk]": "Frame Buffer modul pre KRfb",
|
||||
"Description[sl]": "Vstavki slikovnih medpomnilnikov za KRfb",
|
||||
"Description[sl]": "Vtičniki vmesnika medpomnilnika za KRfb",
|
||||
"Description[sr@ijekavian]": "Прикључци кадробафера за КРФБ",
|
||||
"Description[sr@ijekavianlatin]": "Priključci kadrobafera za KRFB",
|
||||
"Description[sr@latin]": "Priključci kadrobafera za KRFB",
|
||||
|
||||
@@ -624,8 +624,8 @@ Name=Invalid Password Invitations
|
||||
Name[ar]=كلمة المرور الدعوات غير صحيحة
|
||||
Name[bg]=Неправилна парола за покана
|
||||
Name[bs]=Neispravna šifra pozivnice
|
||||
Name[ca]=Contrasenya de les invitacions no vàlides
|
||||
Name[ca@valencia]=Contrasenya de les invitacions no vàlides
|
||||
Name[ca]=Contrasenya no vàlida de les invitacions
|
||||
Name[ca@valencia]=Contrasenya no vàlida de les invitacions
|
||||
Name[cs]=Neplatné hesla výzev
|
||||
Name[da]=Ugyldige adgangskodeinvitationer
|
||||
Name[de]=Ungültiges Einladungs-Passwort
|
||||
@@ -1213,8 +1213,8 @@ Comment[ar]=استقبال اتصال غير متوقع، إنهاء
|
||||
Comment[bg]=Получена е неочаквана връзка. Прекъсване.
|
||||
Comment[bn]=অপ্রত্যাশিত সংযোগ গ্রহণ করল, বাতিল করুন
|
||||
Comment[bs]=Primljena je neočekivana veza, prekini
|
||||
Comment[ca]=S'ha rebut una connexió inesperada, avortant
|
||||
Comment[ca@valencia]=S'ha rebut una connexió inesperada, avortant
|
||||
Comment[ca]=S'ha rebut una connexió inesperada, s'està interrompent
|
||||
Comment[ca@valencia]=S'ha rebut una connexió inesperada, s'està interrompent
|
||||
Comment[cs]=Obdrženo neočekávané spojení, přerušeno
|
||||
Comment[cy]=Derbynwyd cysylltiad annisgwyl,terfynu
|
||||
Comment[da]=Modtog uventet forbindelse, afbrød
|
||||
@@ -1253,7 +1253,7 @@ Comment[nl]=Ontving een onverwachte verbinding, afgebroken
|
||||
Comment[nn]=Fekk ei uventa tilkopling, så avbryt no
|
||||
Comment[pl]=Otrzymano niespodziewane połączenie. Przerwane.
|
||||
Comment[pt]=Foi recebida uma ligação inesperada, pelo que foi interrompida
|
||||
Comment[pt_BR]=Conexão recebida inesperadamente; abortar
|
||||
Comment[pt_BR]=Conexão recebida inesperadamente; cancelar
|
||||
Comment[ro]=Conexiune neașteptată recepționată, abandonare
|
||||
Comment[ru]=Получено неожиданное соединение. Отключение
|
||||
Comment[si]=බලාපොරොත්තු රහිත සබඳතාවක් ලැබිනි, පිටවෙමින්
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
[org.freedesktop.Telepathy.Client]
|
||||
Interfaces=org.freedesktop.Telepathy.Client.Handler;
|
||||
|
||||
[org.freedesktop.Telepathy.Client.Handler.HandlerChannelFilter 0]
|
||||
org.freedesktop.Telepathy.Channel.ChannelType s=org.freedesktop.Telepathy.Channel.Type.StreamTube
|
||||
org.freedesktop.Telepathy.Channel.Type.StreamTube.Service s=rfb
|
||||
org.freedesktop.Telepathy.Channel.Requested b=true
|
||||
@@ -20,6 +20,7 @@
|
||||
#include "invitationsrfbserver.h"
|
||||
#include "krfbconfig.h"
|
||||
#include "krfb_version.h"
|
||||
#include "krfbdebug.h"
|
||||
|
||||
#include <KAboutData>
|
||||
#include <KDBusService>
|
||||
@@ -27,12 +28,11 @@
|
||||
#include <KMessageBox>
|
||||
#include <KWindowSystem>
|
||||
|
||||
#include <QDebug>
|
||||
#include <QPixmap>
|
||||
#include <qwindowdefs.h>
|
||||
#include <QX11Info>
|
||||
|
||||
#include <signal.h>
|
||||
#include <csignal>
|
||||
#include <X11/extensions/XTest.h>
|
||||
#include <QCommandLineParser>
|
||||
#include <QCommandLineOption>
|
||||
@@ -59,13 +59,13 @@ static bool checkX11Capabilities()
|
||||
|
||||
static void checkOldX11PluginConfig() {
|
||||
if (KrfbConfig::preferredFrameBufferPlugin() == QStringLiteral("x11")) {
|
||||
qDebug() << "Detected deprecated configuration: preferredFrameBufferPlugin = x11";
|
||||
qCDebug(KRFB) << "Detected deprecated configuration: preferredFrameBufferPlugin = x11";
|
||||
KConfigSkeletonItem *config_item = KrfbConfig::self()->findItem(
|
||||
QStringLiteral("preferredFrameBufferPlugin"));
|
||||
if (config_item) {
|
||||
config_item->setProperty(QStringLiteral("xcb"));
|
||||
KrfbConfig::self()->save();
|
||||
qDebug() << " Fixed preferredFrameBufferPlugin from x11 to xcb.";
|
||||
qCDebug(KRFB) << " Fixed preferredFrameBufferPlugin from x11 to xcb.";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -81,7 +81,7 @@ static void checkWaylandPluginConfig()
|
||||
if (config_item) {
|
||||
config_item->setProperty(QStringLiteral("pw"));
|
||||
KrfbConfig::self()->save();
|
||||
qDebug() << "Wayland: Fixed preferredFrameBufferPlugin to \"pw\".";
|
||||
qCDebug(KRFB) << "Wayland: Fixed preferredFrameBufferPlugin to \"pw\".";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,7 +21,6 @@
|
||||
#include <KMessageWidget>
|
||||
#include <KStandardAction>
|
||||
#include <KActionCollection>
|
||||
#include <KLineEdit>
|
||||
#include <KNewPasswordDialog>
|
||||
#include <KPluginLoader>
|
||||
#include <KPluginMetaData>
|
||||
@@ -107,7 +106,7 @@ MainWindow::MainWindow(QWidget *parent)
|
||||
setAttribute(Qt::WA_DeleteOnClose, false);
|
||||
|
||||
m_passwordEditable = false;
|
||||
m_passwordLineEdit = new KLineEdit(this);
|
||||
m_passwordLineEdit = new QLineEdit(this);
|
||||
m_passwordLineEdit->setVisible(false);
|
||||
m_passwordLineEdit->setAlignment(Qt::AlignHCenter);
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
#include <KXmlGuiWindow>
|
||||
|
||||
class KLineEdit;
|
||||
class QLineEdit;
|
||||
|
||||
class MainWindow : public KXmlGuiWindow
|
||||
{
|
||||
@@ -43,7 +43,7 @@ class MainWindow : public KXmlGuiWindow
|
||||
private:
|
||||
Ui::MainWidget m_ui;
|
||||
bool m_passwordEditable;
|
||||
KLineEdit *m_passwordLineEdit;
|
||||
QLineEdit *m_passwordLineEdit;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
<name xml:lang="it">Krfb</name>
|
||||
<name xml:lang="ko">Krfb</name>
|
||||
<name xml:lang="nl">Krfb</name>
|
||||
<name xml:lang="nn">Krfb</name>
|
||||
<name xml:lang="pl">Krfb</name>
|
||||
<name xml:lang="pt">Krfb</name>
|
||||
<name xml:lang="pt-BR">Krfb</name>
|
||||
@@ -38,45 +39,35 @@
|
||||
<name xml:lang="x-test">xxKrfbxx</name>
|
||||
<name xml:lang="zh-CN">Krfb</name>
|
||||
<name xml:lang="zh-TW">Krfb</name>
|
||||
<summary>Desktop sharing</summary>
|
||||
<summary xml:lang="ca">Compartició de l'escriptori</summary>
|
||||
<summary xml:lang="ca-valencia">Compartició de l'escriptori</summary>
|
||||
<summary xml:lang="cs">Sdílení pracovní plochy</summary>
|
||||
<summary xml:lang="da">Skrivebordsdeling</summary>
|
||||
<summary xml:lang="de">Freigabe der Arbeitsfläche</summary>
|
||||
<summary xml:lang="el">Κοινή χρήση επιφάνειας εργασίας</summary>
|
||||
<summary xml:lang="en-GB">Desktop sharing</summary>
|
||||
<summary xml:lang="es">Compartir el escritorio</summary>
|
||||
<summary xml:lang="et">Töölaua jagamine</summary>
|
||||
<summary xml:lang="eu">Mahaigaina partekatzea</summary>
|
||||
<summary xml:lang="fi">Työpöydän jako</summary>
|
||||
<summary xml:lang="fr">Partage de bureau</summary>
|
||||
<summary xml:lang="gl">Compartición do escritorio</summary>
|
||||
<summary xml:lang="ia">Compartir de scriptorio</summary>
|
||||
<summary xml:lang="id">Desktop sharing</summary>
|
||||
<summary xml:lang="it">Condivisione del desktop</summary>
|
||||
<summary xml:lang="ko">데스크톱 공유</summary>
|
||||
<summary xml:lang="nl">Bureaublad delen</summary>
|
||||
<summary xml:lang="pl">Współdzielenie pulpitu</summary>
|
||||
<summary xml:lang="pt">Partilha do ecrã</summary>
|
||||
<summary xml:lang="pt-BR">Compartilhamento de tela</summary>
|
||||
<summary xml:lang="ru">Общий рабочий стол</summary>
|
||||
<summary xml:lang="sk">Zdieľanie pracovnej plochy</summary>
|
||||
<summary xml:lang="sl">Souporaba namizja</summary>
|
||||
<summary xml:lang="sr">Дељење површи</summary>
|
||||
<summary xml:lang="sr-Latn">Deljenje površi</summary>
|
||||
<summary xml:lang="sr-ijekavian">Дељење површи</summary>
|
||||
<summary xml:lang="sr-ijekavianlatin">Deljenje površi</summary>
|
||||
<summary xml:lang="sv">Skrivbordsdelning</summary>
|
||||
<summary xml:lang="tr">Masaüstü paylaşımı</summary>
|
||||
<summary xml:lang="uk">Спільне користування стільницею</summary>
|
||||
<summary xml:lang="x-test">xxDesktop sharingxx</summary>
|
||||
<summary xml:lang="zh-CN">桌面共享</summary>
|
||||
<summary xml:lang="zh-TW">桌面分享</summary>
|
||||
<summary>Share your desktop to another computer via VNC</summary>
|
||||
<summary xml:lang="ca">Comparteix l'escriptori amb un altre ordinador a través de VNC</summary>
|
||||
<summary xml:lang="ca-valencia">Comparteix l'escriptori amb un altre ordinador a través de VNC</summary>
|
||||
<summary xml:lang="cs">Sdílejte své pracovní prostředí na jiný počítač pomocí VNC</summary>
|
||||
<summary xml:lang="de">Verbindung Ihrer Arbeitsfläche zu anderen Rechnern über VNC</summary>
|
||||
<summary xml:lang="el">Μοιραστείτε την επιφάνεια εργασίας σας με άλλον υπολογιστή μέσω VNC</summary>
|
||||
<summary xml:lang="en-GB">Share your desktop to another computer via VNC</summary>
|
||||
<summary xml:lang="es">Compartir su escritorio con otro equipo usando VNC</summary>
|
||||
<summary xml:lang="et">Oma töölaua jagamine VNC kaudu teise arvutisse</summary>
|
||||
<summary xml:lang="fi">Jaa työpöytä toiselle koneelle VNC:n kautta</summary>
|
||||
<summary xml:lang="fr">Partager votre bureau avec un autre ordinateur grâce à « VNC »</summary>
|
||||
<summary xml:lang="ia">Compartir tu scriptorio a un altere computator via VNC</summary>
|
||||
<summary xml:lang="id">Bagikan desktopmu ke komputer lainnya via VNC</summary>
|
||||
<summary xml:lang="it">Condividi il desktop con un altro computer tramite VNC</summary>
|
||||
<summary xml:lang="ko">내 데스크톱을 VNC로 다른 컴퓨터와 공유</summary>
|
||||
<summary xml:lang="nl">Uw bureaublad delen naar een andere computer via VNC</summary>
|
||||
<summary xml:lang="nn">Del skrivebordet med ei anna maskin via VNC</summary>
|
||||
<summary xml:lang="pl">Udostępnij swój pulpit innemu komputerowi przez VNC</summary>
|
||||
<summary xml:lang="pt">Partilhar o seu ecrã com outro computador por VNC</summary>
|
||||
<summary xml:lang="pt-BR">Compartilhar sua área de trabalho com outro computador via VNC</summary>
|
||||
<summary xml:lang="sl">Deli namizje z drugim računalnikom prek VNC</summary>
|
||||
<summary xml:lang="sv">Dela ditt skrivbord med en annan dator via VNC</summary>
|
||||
<summary xml:lang="uk">Надайте вашу стільницю у спільне користування з іншим комп'ютером за допомогою VNC</summary>
|
||||
<summary xml:lang="x-test">xxShare your desktop to another computer via VNCxx</summary>
|
||||
<summary xml:lang="zh-CN">通过 VNC 分享您的桌面到另一台电脑</summary>
|
||||
<description>
|
||||
<p>Krfb Desktop Sharing is a server application that allows you to share your current session with a user on another machine, who can use a VNC client to view or even control the desktop.</p>
|
||||
<p xml:lang="ca">El Krfb és una aplicació de servidor que permet compartir la vostra sessió actual amb un usuari en una altra màquina, la qual pot emprar un client VNC per veure o controlar l'escriptori.</p>
|
||||
<p xml:lang="ca-valencia">El Krfb és una aplicació de servidor que permet compartir la vostra sessió actual amb un usuari en una altra màquina, la qual pot emprar un client VNC per veure o controlar l'escriptori.</p>
|
||||
<p xml:lang="ca">El Krfb és una aplicació de servidor que permet compartir la vostra sessió actual amb un usuari en una altra màquina, la qual pot emprar un client VNC per a veure o controlar l'escriptori.</p>
|
||||
<p xml:lang="ca-valencia">El Krfb és una aplicació de servidor que permet compartir la vostra sessió actual amb un usuari en una altra màquina, la qual pot emprar un client VNC per a veure o controlar l'escriptori.</p>
|
||||
<p xml:lang="da">Krfb-skrivebordsdeling er et serverprogram der giver dig mulighed for at dele din nuværende session med en bruger på en anden maskine som kan bruge en VNC-klient til at vise eller endda styrer skrivebordet.</p>
|
||||
<p xml:lang="de">Krfb ist eine Serveranwendung, welche die gemeinsame Benutzung der aktuellen Sitzung mit einem Benutzer auf einem anderen Rechner ermöglicht, der mit Hilfe eines VNC-Programms den Bildschirminhalt sehen oder sogar die Arbeitsfläche bedienen kann.</p>
|
||||
<p xml:lang="el">Η κοινή χρήση επιφάνειας εργασίας Krfb είναι μια εφαρμογή εξυπηρετητή που σας επιτρέπει να μοιράζεστε την τρέχουσα συνεδρία σας με έναν χρήστη σε άλλο μηχάνημα, ο οποίος μπορεί να χρησιμοποιεί έναν πελάτη VNC για να παρακολουθεί ή και να ελέγχει την επιφάνεια εργασίας σας.</p>
|
||||
@@ -87,10 +78,12 @@
|
||||
<p xml:lang="fi">Krfb-työpöytäjako on palvelinsovellus, jolla voit jakaa nykyisen istuntosi toisen koneen käyttäjälle, joka voi VNC-asiakkaalla nähdä tai jopa hallita työpöytääsi.</p>
|
||||
<p xml:lang="fr">Le partage de bureau Krfb est une application de serveur qui vous permet de partager votre session courante avec un utilisateur sur une autre machine, qui peut utiliser un client VNC pour afficher et même contrôler le bureau.</p>
|
||||
<p xml:lang="gl">Krfb é unha aplicación de servidor que permite compartir a sesión actual cun usuario que está noutro equipo, que pode usar un cliente VNC para ver ou mesmo controlar o escritorio.</p>
|
||||
<p xml:lang="ia">Krfb Desktop Sharing es un application de servitor que te permitte compartir tu session currente con un usator sur un altere machina,le qual pote usar un cliente VNC per vider o anque controlar le scriptorio.</p>
|
||||
<p xml:lang="id">Krfb Desktop Sharing adalah aplikasi server yang memungkinkan kamu untuk berbagi sesimu saat ini dengan pengguna di mesin lain, yang bisa menggunakan klien VNC untuk menampilkan atau bahkan mengendalikan desktop.</p>
|
||||
<p xml:lang="it">Condivisione del desktop Krfb è un'applicazione server che permette di condividere la sessione attuale con un utente su un'altra macchina, che potrà usare un client VNC per visualizzare ed anche controllare il desktop.</p>
|
||||
<p xml:lang="ko">Krfb 데스크톱 공유는 현재 세션을 다른 머신의 사용자와 VNC를 통해서 공유하거나 원격 제어를 요청할 수 있는 서버 프로그램입니다.</p>
|
||||
<p xml:lang="nl">Bureaublad delen is een server-applicatie die u in staat stelt uw huidige sessie te delen met een gebruiker op een andere machine, die een VNC-client kan gebruiken om uw bureaublad te bekijken of zelfs te besturen.</p>
|
||||
<p xml:lang="nn">Krfb skrivebordsdeling er eit tenarprogram som lèt deg dela skrivebordsøkta di med ein brukar på ei anna maskin. Vedkommande kan så bruka ein VNC-klient for å sjå og eventuelt òg styra økta.</p>
|
||||
<p xml:lang="pl">Współdzielenie pulpitu Krfb jest aplikacją serwerową, która umożliwia współdzielenie twojej bieżącej sesji z użytkownikiem na innym komputerze, który może użyć klienta VNC do oglądania,a a nawet sterowania twoim pulpitem.</p>
|
||||
<p xml:lang="pt">A Partilha de Ecrã Krfb é uma aplicação de servidor que lhe permite partilhar a sua sessão actual com um utilizador noutra máquina, o qual poderá usar um cliente de VNC para ver ou mesmo controlar o ambiente de trabalho.</p>
|
||||
<p xml:lang="pt-BR">Krfb Desktop Sharing é um aplicativo de servidor que lhe permite compartilhar a sua sessão atual com um usuário em outra máquina, que poderá usar um cliente de VNC para ver ou mesmo controlar a máquina.</p>
|
||||
@@ -128,15 +121,18 @@
|
||||
<caption xml:lang="fi">Työpöydän jakaminen Krfb:llä</caption>
|
||||
<caption xml:lang="fr">Partage de bureau grâce à Krfb</caption>
|
||||
<caption xml:lang="gl">Compartindo o escritorio con Krfb</caption>
|
||||
<caption xml:lang="ia">Compartir scriptorio con Krfb</caption>
|
||||
<caption xml:lang="id">Berbagi desktop dengan Krfb</caption>
|
||||
<caption xml:lang="it">Condivisone del desktop con Krfb</caption>
|
||||
<caption xml:lang="ko">Krfb로 데스크톱 공유</caption>
|
||||
<caption xml:lang="nl">Bureaublad delen met Krfb</caption>
|
||||
<caption xml:lang="nn">Skrivebordsdeling med Krfb</caption>
|
||||
<caption xml:lang="pl">Udostępnienie pulpitu przy użyciu Krfb</caption>
|
||||
<caption xml:lang="pt">Partilha do ecrã com o Krfb</caption>
|
||||
<caption xml:lang="pt-BR">Compartilhando a área de trabalho com o Krfb</caption>
|
||||
<caption xml:lang="ru">Общий доступ к рабочему столу с использованием Krfb</caption>
|
||||
<caption xml:lang="sk">Zdieľanie pracovnej plochy s Krfb</caption>
|
||||
<caption xml:lang="sl">Deljenje namizij s Krfb</caption>
|
||||
<caption xml:lang="sv">Dela skrivbord med Krfb</caption>
|
||||
<caption xml:lang="uk">Спільне використання стільниці за допомогою Krfb</caption>
|
||||
<caption xml:lang="x-test">xxSharing desktop with Krfbxx</caption>
|
||||
@@ -150,9 +146,9 @@
|
||||
</provides>
|
||||
<project_group>KDE</project_group>
|
||||
<releases>
|
||||
<release version="19.12.3" date="2020-03-05"/>
|
||||
<release version="19.12.2" date="2020-02-06"/>
|
||||
<release version="19.12.1" date="2020-01-09"/>
|
||||
<release version="19.12.0" date="2019-12-12"/>
|
||||
<release version="21.04.3" date="2021-07-08"/>
|
||||
<release version="21.04.2" date="2021-06-10"/>
|
||||
<release version="21.04.1" date="2021-05-13"/>
|
||||
<release version="21.04.0" date="2021-04-22"/>
|
||||
</releases>
|
||||
</component>
|
||||
|
||||
@@ -74,76 +74,32 @@ Name[x-test]=xxKrfbxx
|
||||
Name[zh_CN]=Krfb
|
||||
Name[zh_HK]=Krfb
|
||||
Name[zh_TW]=桌面分享_Krfb
|
||||
GenericName=Desktop Sharing
|
||||
GenericName[ar]=مشاركة سطح المكتب
|
||||
GenericName[bg]=Споделяне на работния плот
|
||||
GenericName[bn]=ডেস্কটপ ভাগাভাগি
|
||||
GenericName[br]=Rannañ ar vurev
|
||||
GenericName[bs]=Dijeljenje radne površine
|
||||
GenericName[ca]=Compartir l'escriptori
|
||||
GenericName[ca@valencia]=Compartir l'escriptori
|
||||
GenericName[cs]=Sdílení pracovní plochy
|
||||
GenericName[cy]=Rhannu Penbwrdd
|
||||
GenericName[da]=Skrivebordsdeling
|
||||
GenericName[de]=Arbeitsfläche freigeben
|
||||
GenericName[el]=Κοινή χρήση επιφάνειας εργασίας
|
||||
GenericName[en_GB]=Desktop Sharing
|
||||
GenericName[eo]=Tabula komunigado
|
||||
GenericName[es]=Escritorio compartido
|
||||
GenericName[et]=Töölaua jagamine
|
||||
GenericName[eu]=Mahaigaina partekatzea
|
||||
GenericName[fa]=اشتراک رومیزی
|
||||
GenericName[fi]=Työpöydän jakaminen
|
||||
GenericName[fr]=Partage de bureaux
|
||||
GenericName[ga]=Roinnt Deisce
|
||||
GenericName[gl]=Compartimento de escritorio
|
||||
GenericName[he]=שיתוף שולחנות עבודה
|
||||
GenericName[hi]=डेस्कटॉप साझेदारी
|
||||
GenericName[hne]=डेस्कटाप साझेदारी
|
||||
GenericName[hr]=Dijeljenje radne površine
|
||||
GenericName[hu]=Munkaasztal-megosztás
|
||||
GenericName[ia]=Compartir de scriptorio
|
||||
GenericName[id]=Desktop Sharing
|
||||
GenericName[is]=Skjáborðsmiðlun
|
||||
GenericName[it]=Condivisione del desktop
|
||||
GenericName[ja]=デスクトップ共有
|
||||
GenericName[kk]=Үстелді ортақтастыру
|
||||
GenericName[km]=ការចែករំលែកផ្ទៃតុ
|
||||
GenericName[ko]=데스크톱 공유
|
||||
GenericName[lt]=Dalinimasis darbalaukiu
|
||||
GenericName[lv]=Darbvirsmas koplietošana
|
||||
GenericName[ml]=പണിയിടം പങ്കുവെക്കല്
|
||||
GenericName[mr]=डेस्कटॉप शेअरींग
|
||||
GenericName[nb]=Delte skrivebord
|
||||
GenericName[nds]=Schriefdisch-Freegaav
|
||||
GenericName[ne]=डेस्कटप साझेदारी
|
||||
GenericName[nl]=Bureaublad delen
|
||||
GenericName[nn]=Skrivebordsdeling
|
||||
GenericName[pa]=ਡੈਸਕਟਾਪ ਸ਼ੇਅਰਿੰਗ
|
||||
GenericName[pl]=Współdzielenie pulpitu
|
||||
GenericName[pt]=Partilha do Ecrã
|
||||
GenericName[pt_BR]=Compartilhamento de ambiente de trabalho
|
||||
GenericName[ro]=Partajare birou
|
||||
GenericName[ru]=Общий рабочий стол
|
||||
GenericName[si]=වැඩතල හවුල්
|
||||
GenericName[sk]=Zdieľanie pracovnej plochy
|
||||
GenericName[sl]=Souporaba namizja
|
||||
GenericName[sr]=Дељење површи
|
||||
GenericName[sr@ijekavian]=Дијељење површи
|
||||
GenericName[sr@ijekavianlatin]=Dijeljenje površi
|
||||
GenericName[sr@latin]=Deljenje površi
|
||||
GenericName[sv]=Dela ut skrivbordet
|
||||
GenericName[th]=ใช้งานพื้นที่ทำงานร่วมกัน
|
||||
GenericName[tr]=Masaüstü Paylaşımı
|
||||
GenericName[ug]=ئۈستەلئۈستىنى ھەمبەھىرلەش
|
||||
GenericName[uk]=Спільні стільниці
|
||||
GenericName[uz]=Ish stoli bilan boʻlishish
|
||||
GenericName[uz@cyrillic]=Иш столи билан бўлишиш
|
||||
GenericName[vi]=Chia sẻ màn hình nền
|
||||
GenericName[x-test]=xxDesktop Sharingxx
|
||||
GenericName[zh_CN]=桌面共享
|
||||
GenericName[zh_HK]=桌面分享
|
||||
GenericName[zh_TW]=桌面分享
|
||||
GenericName=Desktop Sharing (VNC)
|
||||
GenericName[ca]=Compartició de l'escriptori (VNC)
|
||||
GenericName[ca@valencia]=Compartició de l'escriptori (VNC)
|
||||
GenericName[cs]=Sdílení pracovní plochy (VNC)
|
||||
GenericName[da]=Skrivebordsdeling (VNC)
|
||||
GenericName[de]=Arbeitsflächen-Freigabe (VNC)
|
||||
GenericName[el]=Κοινή χρήση επιφάνειας εργασίας (VNC)
|
||||
GenericName[en_GB]=Desktop Sharing (VNC)
|
||||
GenericName[es]=Escritorio compartido (VNC)
|
||||
GenericName[et]=Töölaua jagamine (VNC)
|
||||
GenericName[fi]=Työpöydän jakaminen (VNC)
|
||||
GenericName[fr]=Partage de bureaux (VNC)
|
||||
GenericName[ia]=Compartir de scriptorio (VNC)
|
||||
GenericName[it]=Condivisione del desktop (VNC)
|
||||
GenericName[ko]=데스크톱 공유(VNC)
|
||||
GenericName[nl]=Bureaublad delen (VNC)
|
||||
GenericName[nn]=Skrivebordsdeling (VNC)
|
||||
GenericName[pl]=Współdzielenie pulpitu (VNC)
|
||||
GenericName[pt]=Partilha do Ecrã (VNC)
|
||||
GenericName[pt_BR]=Compartilhamento de ambiente de trabalho (VNC)
|
||||
GenericName[sk]=Zdieľanie pracovnej plochy (VNC)
|
||||
GenericName[sl]=Souporaba namizja (VNC)
|
||||
GenericName[sv]=Skrivbordsdelning (VNC)
|
||||
GenericName[uk]=Спільні стільниці (VNC)
|
||||
GenericName[x-test]=xxDesktop Sharing (VNC)xx
|
||||
GenericName[zh_CN]=桌面共享 (VNC)
|
||||
Comment=Desktop Sharing
|
||||
Comment[af]=Werkskerm Deeling
|
||||
Comment[ar]=مشاركة سطح المكتب
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
#include "sockethelpers.h"
|
||||
#include "eventsmanager.h"
|
||||
#include <QSocketNotifier>
|
||||
#include <QDebug>
|
||||
#include <poll.h>
|
||||
#include <strings.h> //for bzero()
|
||||
|
||||
|
||||
@@ -19,11 +19,11 @@
|
||||
*/
|
||||
#include "rfbserver.h"
|
||||
#include "rfbservermanager.h"
|
||||
#include "krfbdebug.h"
|
||||
#include <QSocketNotifier>
|
||||
#include <QApplication>
|
||||
#include <QClipboard>
|
||||
#include <QPointer>
|
||||
#include <QDebug>
|
||||
#include <QX11Info>
|
||||
|
||||
struct RfbServer::Private
|
||||
@@ -92,7 +92,7 @@ bool RfbServer::start()
|
||||
if (!d->screen) {
|
||||
d->screen = RfbServerManager::instance()->newScreen();
|
||||
if (!d->screen) {
|
||||
qDebug() << "Unable to get rbfserver screen";
|
||||
qCDebug(KRFB) << "Unable to get rbfserver screen";
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -125,14 +125,14 @@ bool RfbServer::start()
|
||||
d->screen->authPasswdData = (void *)nullptr;
|
||||
}
|
||||
|
||||
qDebug() << "Starting server. Listen port:" << listeningPort()
|
||||
qCDebug(KRFB) << "Starting server. Listen port:" << listeningPort()
|
||||
<< "Listen Address:" << listeningAddress()
|
||||
<< "Password enabled:" << passwordRequired();
|
||||
|
||||
rfbInitServer(d->screen);
|
||||
|
||||
if (!rfbIsActive(d->screen)) {
|
||||
qDebug() << "Failed to start server";
|
||||
qCDebug(KRFB) << "Failed to start server";
|
||||
rfbShutdownServer(d->screen, false);
|
||||
return false;
|
||||
};
|
||||
@@ -253,7 +253,7 @@ void RfbServer::pendingClientFinished(RfbClient *client)
|
||||
rfbNewClientAction RfbServer::newClientHook(rfbClientPtr cl)
|
||||
{
|
||||
//qDebug() << "New client";
|
||||
RfbServer *server = static_cast<RfbServer*>(cl->screen->screenData);
|
||||
auto server = static_cast<RfbServer*>(cl->screen->screenData);
|
||||
|
||||
PendingRfbClient *pendingClient = server->newClient(cl);
|
||||
connect(pendingClient, &PendingRfbClient::finished,
|
||||
@@ -266,7 +266,7 @@ rfbNewClientAction RfbServer::newClientHook(rfbClientPtr cl)
|
||||
void RfbServer::clientGoneHook(rfbClientPtr cl)
|
||||
{
|
||||
//qDebug() << "client gone";
|
||||
RfbClient *client = static_cast<RfbClient*>(cl->clientData);
|
||||
auto client = static_cast<RfbClient*>(cl->clientData);
|
||||
|
||||
RfbServerManager::instance()->removeClient(client);
|
||||
client->deleteLater();
|
||||
@@ -275,7 +275,7 @@ void RfbServer::clientGoneHook(rfbClientPtr cl)
|
||||
//static
|
||||
rfbBool RfbServer::passwordCheck(rfbClientPtr cl, const char *encryptedPassword, int len)
|
||||
{
|
||||
PendingRfbClient *client = static_cast<PendingRfbClient*>(cl->clientData);
|
||||
auto client = static_cast<PendingRfbClient*>(cl->clientData);
|
||||
Q_ASSERT(client);
|
||||
return client->checkPassword(QByteArray::fromRawData(encryptedPassword, len));
|
||||
}
|
||||
@@ -283,14 +283,14 @@ rfbBool RfbServer::passwordCheck(rfbClientPtr cl, const char *encryptedPassword,
|
||||
//static
|
||||
void RfbServer::keyboardHook(rfbBool down, rfbKeySym keySym, rfbClientPtr cl)
|
||||
{
|
||||
RfbClient *client = static_cast<RfbClient*>(cl->clientData);
|
||||
auto client = static_cast<RfbClient*>(cl->clientData);
|
||||
client->handleKeyboardEvent(down ? true : false, keySym);
|
||||
}
|
||||
|
||||
//static
|
||||
void RfbServer::pointerHook(int bm, int x, int y, rfbClientPtr cl)
|
||||
{
|
||||
RfbClient *client = static_cast<RfbClient*>(cl->clientData);
|
||||
auto client = static_cast<RfbClient*>(cl->clientData);
|
||||
client->handleMouseEvent(bm, x, y);
|
||||
}
|
||||
|
||||
|
||||
@@ -29,7 +29,6 @@
|
||||
#include <QDesktopWidget>
|
||||
#include <QGlobalStatic>
|
||||
#include <QHostInfo>
|
||||
#include <QDebug>
|
||||
|
||||
#include <KLocalizedString>
|
||||
#include <KUser>
|
||||
|
||||
@@ -28,14 +28,13 @@
|
||||
|
||||
QString peerAddress(int sock)
|
||||
{
|
||||
|
||||
const int ADDR_SIZE = 50;
|
||||
struct sockaddr sa;
|
||||
struct sockaddr sa = {};
|
||||
socklen_t salen = sizeof(struct sockaddr);
|
||||
|
||||
if (getpeername(sock, &sa, &salen) == 0) {
|
||||
if (sa.sa_family == AF_INET) {
|
||||
struct sockaddr_in *si = (struct sockaddr_in *)&sa;
|
||||
auto si = (struct sockaddr_in *)&sa;
|
||||
return QString::fromLatin1(inet_ntoa(si->sin_addr));
|
||||
}
|
||||
|
||||
@@ -53,12 +52,11 @@ QString peerAddress(int sock)
|
||||
|
||||
unsigned short peerPort(int sock)
|
||||
{
|
||||
|
||||
struct sockaddr sa;
|
||||
struct sockaddr sa = {};
|
||||
socklen_t salen = sizeof(struct sockaddr);
|
||||
|
||||
if (getpeername(sock, &sa, &salen) == 0) {
|
||||
struct sockaddr_in *si = (struct sockaddr_in *)&sa;
|
||||
auto si = (struct sockaddr_in *)&sa;
|
||||
return ntohs(si->sin_port);
|
||||
}
|
||||
|
||||
@@ -67,14 +65,13 @@ unsigned short peerPort(int sock)
|
||||
|
||||
QString localAddress(int sock)
|
||||
{
|
||||
|
||||
const int ADDR_SIZE = 50;
|
||||
struct sockaddr sa;
|
||||
struct sockaddr sa = {};
|
||||
socklen_t salen = sizeof(struct sockaddr);
|
||||
|
||||
if (getsockname(sock, &sa, &salen) == 0) {
|
||||
if (sa.sa_family == AF_INET) {
|
||||
struct sockaddr_in *si = (struct sockaddr_in *)&sa;
|
||||
auto si = (struct sockaddr_in *)&sa;
|
||||
return QString::fromLatin1(inet_ntoa(si->sin_addr));
|
||||
}
|
||||
|
||||
@@ -92,12 +89,11 @@ QString localAddress(int sock)
|
||||
|
||||
unsigned short localPort(int sock)
|
||||
{
|
||||
|
||||
struct sockaddr sa;
|
||||
struct sockaddr sa = {};
|
||||
socklen_t salen = sizeof(struct sockaddr);
|
||||
|
||||
if (getsockname(sock, &sa, &salen) == 0) {
|
||||
struct sockaddr_in *si = (struct sockaddr_in *)&sa;
|
||||
auto si = (struct sockaddr_in *)&sa;
|
||||
return ntohs(si->sin_port);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user