From 5a8a64d284beb0ee9461d2704f69e0fb241bc8ab Mon Sep 17 00:00:00 2001 From: fufesou Date: Wed, 29 Nov 2023 23:44:28 +0800 Subject: [PATCH 1/4] fix, elevated mode, switch display Signed-off-by: fufesou --- src/lang/ar.rs | 1 + src/lang/ca.rs | 1 + src/lang/cn.rs | 1 + src/lang/cs.rs | 1 + src/lang/da.rs | 1 + src/lang/de.rs | 1 + src/lang/el.rs | 1 + src/lang/en.rs | 1 + src/lang/eo.rs | 1 + src/lang/es.rs | 1 + src/lang/fa.rs | 1 + src/lang/fr.rs | 1 + src/lang/hu.rs | 1 + src/lang/id.rs | 1 + src/lang/it.rs | 1 + src/lang/ja.rs | 1 + src/lang/ko.rs | 1 + src/lang/kz.rs | 1 + src/lang/lt.rs | 1 + src/lang/lv.rs | 1 + src/lang/nb.rs | 1 + src/lang/nl.rs | 1 + src/lang/pl.rs | 1 + src/lang/pt_PT.rs | 1 + src/lang/ptbr.rs | 1 + src/lang/ro.rs | 1 + src/lang/ru.rs | 1 + src/lang/sk.rs | 1 + src/lang/sl.rs | 1 + src/lang/sq.rs | 1 + src/lang/sr.rs | 1 + src/lang/sv.rs | 1 + src/lang/template.rs | 1 + src/lang/th.rs | 1 + src/lang/tr.rs | 1 + src/lang/tw.rs | 1 + src/lang/ua.rs | 1 + src/lang/vn.rs | 1 + src/server/connection.rs | 16 ++++++++++++++++ src/server/portable_service.rs | 10 +--------- 40 files changed, 55 insertions(+), 9 deletions(-) diff --git a/src/lang/ar.rs b/src/lang/ar.rs index bdab9e466..cb1bf4585 100644 --- a/src/lang/ar.rs +++ b/src/lang/ar.rs @@ -552,6 +552,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Remove wallpaper during incoming sessions", ""), ("Test", ""), ("switch_display_elevated_connections_tip", ""), + ("capture_display_elevated_connections_tip", ""), ("display_is_plugged_out_msg", ""), ("No displays", ""), ("elevated_switch_display_msg", ""), diff --git a/src/lang/ca.rs b/src/lang/ca.rs index 36aba208c..9e1ca0d6d 100644 --- a/src/lang/ca.rs +++ b/src/lang/ca.rs @@ -552,6 +552,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Remove wallpaper during incoming sessions", ""), ("Test", ""), ("switch_display_elevated_connections_tip", ""), + ("capture_display_elevated_connections_tip", ""), ("display_is_plugged_out_msg", ""), ("No displays", ""), ("elevated_switch_display_msg", ""), diff --git a/src/lang/cn.rs b/src/lang/cn.rs index 86a01bd6b..68fa2d732 100644 --- a/src/lang/cn.rs +++ b/src/lang/cn.rs @@ -552,6 +552,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Remove wallpaper during incoming sessions", "接受会话时移除桌面壁纸"), ("Test", "测试"), ("switch_display_elevated_connections_tip", "提权后,被控有多个连接,不能切换到非主显示器。若要控制多显示器,请安装后再试。"), + ("capture_display_elevated_connections_tip", "提权后,不能显示多个显示器。若要控制多显示器,请安装后再试。"), ("display_is_plugged_out_msg", "显示器被拔出,切换到第一个显示器。"), ("No displays", "没有显示器。"), ("elevated_switch_display_msg", "切换到主显示器,因为提权后,不支持多显示器画面。"), diff --git a/src/lang/cs.rs b/src/lang/cs.rs index 616071e88..ec08cd26b 100644 --- a/src/lang/cs.rs +++ b/src/lang/cs.rs @@ -552,6 +552,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Remove wallpaper during incoming sessions", "Odstranit tapetu během příchozích relací"), ("Test", "Test"), ("switch_display_elevated_connections_tip", "Přepnutí na jinou než primární obrazovku není podporováno ve zvýšeném režimu, pokud existuje více připojení. Pokud chcete ovládat více obrazovek, zkuste to po instalaci znovu."), + ("capture_display_elevated_connections_tip", ""), ("display_is_plugged_out_msg", "Obrazovka je odpojena, přepněte na první obrazovku."), ("No displays", "Žádné obrazovky"), ("elevated_switch_display_msg", "Přepnout na primární obrazovku, protože více obrazovek není podporováno ve zvýšeném režimu."), diff --git a/src/lang/da.rs b/src/lang/da.rs index ed926f0df..8c0b6de81 100644 --- a/src/lang/da.rs +++ b/src/lang/da.rs @@ -552,6 +552,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Remove wallpaper during incoming sessions", ""), ("Test", ""), ("switch_display_elevated_connections_tip", ""), + ("capture_display_elevated_connections_tip", ""), ("display_is_plugged_out_msg", ""), ("No displays", ""), ("elevated_switch_display_msg", ""), diff --git a/src/lang/de.rs b/src/lang/de.rs index 1473119c4..9a4da17b9 100644 --- a/src/lang/de.rs +++ b/src/lang/de.rs @@ -552,6 +552,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Remove wallpaper during incoming sessions", "Hintergrundbild während eingehender Sitzungen entfernen"), ("Test", "Test"), ("switch_display_elevated_connections_tip", "Das Umschalten auf einen sekundären Bildschirm wird mit erhöhten Rechten nicht unterstützt, wenn mehrere Verbindungen bestehen. Bitte versuchen Sie es nach der Installation erneut, wenn Sie mehrere Bildschirme steuern möchten."), + ("capture_display_elevated_connections_tip", ""), ("display_is_plugged_out_msg", "Der Bildschirm ist nicht angeschlossen, schalten Sie auf den ersten Bildschirm um."), ("No displays", "Keine Bildschirme"), ("elevated_switch_display_msg", "Wechseln Sie zum primären Bildschirm, da mehrere Bildschirme im erweiterten Modus nicht unterstützt werden."), diff --git a/src/lang/el.rs b/src/lang/el.rs index 8bb3a3d79..e01405f50 100644 --- a/src/lang/el.rs +++ b/src/lang/el.rs @@ -552,6 +552,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Remove wallpaper during incoming sessions", ""), ("Test", ""), ("switch_display_elevated_connections_tip", ""), + ("capture_display_elevated_connections_tip", ""), ("display_is_plugged_out_msg", ""), ("No displays", ""), ("elevated_switch_display_msg", ""), diff --git a/src/lang/en.rs b/src/lang/en.rs index 101bc63a3..fd21d62a9 100644 --- a/src/lang/en.rs +++ b/src/lang/en.rs @@ -199,6 +199,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("pull_group_failed_tip", "Failed to refresh group"), ("doc_fix_wayland", "https://rustdesk.com/docs/en/manual/linux/#x11-required"), ("switch_display_elevated_connections_tip", "Switching to non-primary display is not supported in the elevated mode when there are multiple connections. Please try again after installation if you want to control multiple displays."), + ("capture_display_elevated_connections_tip", "Capturing multiple displays is not supported in the elevated mode. Please try again after installation if you want to control multiple displays."), ("display_is_plugged_out_msg", "The display is plugged out, switch to the first display."), ("elevated_switch_display_msg", "Switch to the primary display because multiple displays are not supported in elevated mode."), ("selinux_tip", "SELinux is enabled on your device, which may prevent RustDesk from running properly as controlled side."), diff --git a/src/lang/eo.rs b/src/lang/eo.rs index 73eb77aa5..a2bcac59c 100644 --- a/src/lang/eo.rs +++ b/src/lang/eo.rs @@ -552,6 +552,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Remove wallpaper during incoming sessions", ""), ("Test", ""), ("switch_display_elevated_connections_tip", ""), + ("capture_display_elevated_connections_tip", ""), ("display_is_plugged_out_msg", ""), ("No displays", ""), ("elevated_switch_display_msg", ""), diff --git a/src/lang/es.rs b/src/lang/es.rs index 40a23f317..a8985c0e3 100644 --- a/src/lang/es.rs +++ b/src/lang/es.rs @@ -552,6 +552,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Remove wallpaper during incoming sessions", "Quitar el fonde de pantalla durante sesiones entrantes"), ("Test", "Probar"), ("switch_display_elevated_connections_tip", "Cambiar a una pantalla no principal no está soportado en el modo elevado cuando hay múltiples conexiones. Por favor, inténtalo de nuevo tras la instalación si quieres controlar múltiples pantallas."), + ("capture_display_elevated_connections_tip", ""), ("display_is_plugged_out_msg", "La pantalla está desconectada, cambia a la principal."), ("No displays", "No hay pantallas"), ("elevated_switch_display_msg", "Cambiar a la pantalla principal porque mútliples pantallas no están soportadas en modo elevado."), diff --git a/src/lang/fa.rs b/src/lang/fa.rs index af0b8e944..d81743482 100644 --- a/src/lang/fa.rs +++ b/src/lang/fa.rs @@ -552,6 +552,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Remove wallpaper during incoming sessions", ""), ("Test", ""), ("switch_display_elevated_connections_tip", ""), + ("capture_display_elevated_connections_tip", ""), ("display_is_plugged_out_msg", ""), ("No displays", ""), ("elevated_switch_display_msg", ""), diff --git a/src/lang/fr.rs b/src/lang/fr.rs index ea90ff654..9fb829d1e 100644 --- a/src/lang/fr.rs +++ b/src/lang/fr.rs @@ -552,6 +552,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Remove wallpaper during incoming sessions", ""), ("Test", ""), ("switch_display_elevated_connections_tip", ""), + ("capture_display_elevated_connections_tip", ""), ("display_is_plugged_out_msg", ""), ("No displays", ""), ("elevated_switch_display_msg", ""), diff --git a/src/lang/hu.rs b/src/lang/hu.rs index f179da1df..e9f808ffd 100644 --- a/src/lang/hu.rs +++ b/src/lang/hu.rs @@ -552,6 +552,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Remove wallpaper during incoming sessions", ""), ("Test", ""), ("switch_display_elevated_connections_tip", ""), + ("capture_display_elevated_connections_tip", ""), ("display_is_plugged_out_msg", ""), ("No displays", ""), ("elevated_switch_display_msg", ""), diff --git a/src/lang/id.rs b/src/lang/id.rs index 780b24bbd..fb8780369 100644 --- a/src/lang/id.rs +++ b/src/lang/id.rs @@ -552,6 +552,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Remove wallpaper during incoming sessions", "Hilangkan latar dinding ketika ada sesi yang masuk"), ("Test", "Tes"), ("switch_display_elevated_connections_tip", "Pada mode elevasi, jika terdapat beberapa tampilan yang aktif, maka tidak diizinkan berpindah ke yang bukan tampilan utama, silahkan coba lagi setelah proses instalasi jika kamu ingin melakukan kontrol ke tampilan layar lainnya"), + ("capture_display_elevated_connections_tip", ""), ("display_is_plugged_out_msg", "Layar terputus, pindah ke layar pertama"), ("No displays", "Tidak ada tampilan"), ("elevated_switch_display_msg", "Pindah ke tampilan utama, pada mode elevasi, pengggunaan lebih dari satu layar tidak diizinkan"), diff --git a/src/lang/it.rs b/src/lang/it.rs index e148ece66..5eeb26a37 100644 --- a/src/lang/it.rs +++ b/src/lang/it.rs @@ -552,6 +552,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Remove wallpaper during incoming sessions", "Rimuovi lo sfondo durante le sessioni in entrata"), ("Test", "Test"), ("switch_display_elevated_connections_tip", "Nella modalità elevata quando sono presenti più connessioni non è supportato il passaggio allo schermo non primario. Se vuoi controllare più schermi riprova dopo l'installazione."), + ("capture_display_elevated_connections_tip", ""), ("display_is_plugged_out_msg", "Lo schermo è scollegato, passo al primo schermo."), ("No displays", "Nessuno schermo"), ("elevated_switch_display_msg", "Passo allo schermo principale perché in modalità elevata non sono supportati più schermi."), diff --git a/src/lang/ja.rs b/src/lang/ja.rs index 0ff52484c..720e3beca 100644 --- a/src/lang/ja.rs +++ b/src/lang/ja.rs @@ -552,6 +552,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Remove wallpaper during incoming sessions", ""), ("Test", ""), ("switch_display_elevated_connections_tip", ""), + ("capture_display_elevated_connections_tip", ""), ("display_is_plugged_out_msg", ""), ("No displays", ""), ("elevated_switch_display_msg", ""), diff --git a/src/lang/ko.rs b/src/lang/ko.rs index 36d8338b9..42a55e70d 100644 --- a/src/lang/ko.rs +++ b/src/lang/ko.rs @@ -552,6 +552,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Remove wallpaper during incoming sessions", "세션 수락시 배경화면 제거"), ("Test", "테스트"), ("switch_display_elevated_connections_tip", "권한을 승격한 후에는 사용자에게 다중 연결 요금이 부과되며 기본이 아닌 디스플레이로 전환할 수 없습니다. 여러 대의 모니터를 제어하려면 설치 후 다시 시도하세요"), + ("capture_display_elevated_connections_tip", ""), ("display_is_plugged_out_msg", "모니터의 연결이 끈어지면 첫 번째 모니터로 전환됩니다"), ("No displays", "디스플레이 없음"), ("elevated_switch_display_msg", "권한 상승 이후에는 다중 모니터 화면이 지원되지 않으므로 메인 모니터로 전환하세요"), diff --git a/src/lang/kz.rs b/src/lang/kz.rs index 7a552e96a..450ad6e2a 100644 --- a/src/lang/kz.rs +++ b/src/lang/kz.rs @@ -552,6 +552,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Remove wallpaper during incoming sessions", ""), ("Test", ""), ("switch_display_elevated_connections_tip", ""), + ("capture_display_elevated_connections_tip", ""), ("display_is_plugged_out_msg", ""), ("No displays", ""), ("elevated_switch_display_msg", ""), diff --git a/src/lang/lt.rs b/src/lang/lt.rs index b4990d9c6..5692eacce 100644 --- a/src/lang/lt.rs +++ b/src/lang/lt.rs @@ -552,6 +552,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Remove wallpaper during incoming sessions", ""), ("Test", ""), ("switch_display_elevated_connections_tip", ""), + ("capture_display_elevated_connections_tip", ""), ("display_is_plugged_out_msg", ""), ("No displays", ""), ("elevated_switch_display_msg", ""), diff --git a/src/lang/lv.rs b/src/lang/lv.rs index 53b714723..8108a21f6 100644 --- a/src/lang/lv.rs +++ b/src/lang/lv.rs @@ -552,6 +552,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Remove wallpaper during incoming sessions", "Noņemt fona tapeti ienākošo sesiju laikā"), ("Test", "Pārbaudīt"), ("switch_display_elevated_connections_tip", "Pārslēgšanās uz ne primāro displeju netiek atbalstīta paaugstinātajā režīmā, ja ir vairāki savienojumi. Lūdzu, mēģiniet vēlreiz pēc instalēšanas, ja vēlaties kontrolēt vairākus displejus."), + ("capture_display_elevated_connections_tip", ""), ("display_is_plugged_out_msg", "Displejs ir atvienots, pārslēdzieties uz pirmo displeju."), ("No displays", "Nav displeju"), ("elevated_switch_display_msg", "Pārslēdzieties uz primāro displeju, jo paaugstinātajā režīmā netiek atbalstīti vairāki displeji."), diff --git a/src/lang/nb.rs b/src/lang/nb.rs index 4f8945721..cd6440d22 100644 --- a/src/lang/nb.rs +++ b/src/lang/nb.rs @@ -552,6 +552,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Remove wallpaper during incoming sessions", ""), ("Test", ""), ("switch_display_elevated_connections_tip", ""), + ("capture_display_elevated_connections_tip", ""), ("display_is_plugged_out_msg", ""), ("No displays", ""), ("elevated_switch_display_msg", ""), diff --git a/src/lang/nl.rs b/src/lang/nl.rs index 7b66fb3f3..41980887a 100644 --- a/src/lang/nl.rs +++ b/src/lang/nl.rs @@ -552,6 +552,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Remove wallpaper during incoming sessions", "Achtergrond verwijderen tijdens inkomende sessies"), ("Test", "Test"), ("switch_display_elevated_connections_tip", "Overschakelen naar een niet-hoofdbeeldscherm wordt niet ondersteund in de verhoogde modus wanneer er meerdere verbindingen zijn. Probeer het opnieuw na de installatie als je meerdere schermen wilt beheren."), + ("capture_display_elevated_connections_tip", ""), ("display_is_plugged_out_msg", "Beeldscherm is uitgeschakeld, schakel over naar het primaire beeldscherm."), ("No displays", "Geen beeldschermen"), ("elevated_switch_display_msg", "Schakel over naar het primaire beeldscherm, aangezien meerdere beeldschermen niet worden ondersteund in de modus met verhoogde rechten."), diff --git a/src/lang/pl.rs b/src/lang/pl.rs index 3aa80786e..450ab1354 100644 --- a/src/lang/pl.rs +++ b/src/lang/pl.rs @@ -552,6 +552,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Remove wallpaper during incoming sessions", "Usuń tapetę podczas sesji przychodzących"), ("Test", "Test"), ("switch_display_elevated_connections_tip", "Przełączanie na ekran inny niż główny nie jest obsługiwane przy podniesionych uprawnieniach, gdy istnieje wiele połączeń. Jeśli chcesz sterować wieloma ekranami, należy zainstalować program."), + ("capture_display_elevated_connections_tip", ""), ("display_is_plugged_out_msg", "Ekran został odłączony, przełącz się na pierwszy ekran."), ("No displays", "Brak ekranów"), ("elevated_switch_display_msg", "Przełącz się na ekran główny, ponieważ wyświetlanie kilku ekranów nie jest obsługiwane przy podniesionych uprawnieniach."), diff --git a/src/lang/pt_PT.rs b/src/lang/pt_PT.rs index 6b89eaa8c..bce56d497 100644 --- a/src/lang/pt_PT.rs +++ b/src/lang/pt_PT.rs @@ -552,6 +552,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Remove wallpaper during incoming sessions", ""), ("Test", ""), ("switch_display_elevated_connections_tip", ""), + ("capture_display_elevated_connections_tip", ""), ("display_is_plugged_out_msg", ""), ("No displays", ""), ("elevated_switch_display_msg", ""), diff --git a/src/lang/ptbr.rs b/src/lang/ptbr.rs index c5c4f2768..0a3a5c3ef 100644 --- a/src/lang/ptbr.rs +++ b/src/lang/ptbr.rs @@ -552,6 +552,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Remove wallpaper during incoming sessions", ""), ("Test", ""), ("switch_display_elevated_connections_tip", ""), + ("capture_display_elevated_connections_tip", ""), ("display_is_plugged_out_msg", ""), ("No displays", ""), ("elevated_switch_display_msg", ""), diff --git a/src/lang/ro.rs b/src/lang/ro.rs index 5e806e426..b00fdd0a1 100644 --- a/src/lang/ro.rs +++ b/src/lang/ro.rs @@ -552,6 +552,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Remove wallpaper during incoming sessions", ""), ("Test", ""), ("switch_display_elevated_connections_tip", ""), + ("capture_display_elevated_connections_tip", ""), ("display_is_plugged_out_msg", ""), ("No displays", ""), ("elevated_switch_display_msg", ""), diff --git a/src/lang/ru.rs b/src/lang/ru.rs index 98994795d..0f9328947 100644 --- a/src/lang/ru.rs +++ b/src/lang/ru.rs @@ -552,6 +552,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Remove wallpaper during incoming sessions", "Удалять обои в сеансе"), ("Test", "Тест"), ("switch_display_elevated_connections_tip", "Переключение на неосновной дисплей не поддерживается в режиме повышенных прав при наличии нескольких подключений. Повторите попытку после установки, если хотите управлять несколькими дисплеями."), + ("capture_display_elevated_connections_tip", ""), ("display_is_plugged_out_msg", "Дисплей отключён, переключитесь на первый дисплей."), ("No displays", "Нет дисплеев"), ("elevated_switch_display_msg", "Переключитесь на основной дисплей, поскольку в режиме повышенных прав несколько дисплеев не поддерживаются."), diff --git a/src/lang/sk.rs b/src/lang/sk.rs index 46848da73..bd91f8ca4 100644 --- a/src/lang/sk.rs +++ b/src/lang/sk.rs @@ -552,6 +552,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Remove wallpaper during incoming sessions", "Odstrániť tapetu počas prichádzajúcich relácií"), ("Test", "Test"), ("switch_display_elevated_connections_tip", "Prepínanie na inú ako primárnu obrazovku nie je podporované vo zvýšenom režime, ak existuje viacero pripojení. Ak chcete ovládať viacero obrazoviek, skúste to po inštalácii znova."), + ("capture_display_elevated_connections_tip", ""), ("display_is_plugged_out_msg", "Obrazovka je odpojená, prepnite na prvú obrazovku."), ("No displays", "Žiadne obrazovky"), ("elevated_switch_display_msg", "Prepnite na primárnu obrazovku, pretože viacero obrazoviek nie je podporovaných vo zvýšenom režime."), diff --git a/src/lang/sl.rs b/src/lang/sl.rs index be9774be8..2aab6d959 100755 --- a/src/lang/sl.rs +++ b/src/lang/sl.rs @@ -552,6 +552,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Remove wallpaper during incoming sessions", ""), ("Test", ""), ("switch_display_elevated_connections_tip", ""), + ("capture_display_elevated_connections_tip", ""), ("display_is_plugged_out_msg", ""), ("No displays", ""), ("elevated_switch_display_msg", ""), diff --git a/src/lang/sq.rs b/src/lang/sq.rs index ff8851b94..a396be189 100644 --- a/src/lang/sq.rs +++ b/src/lang/sq.rs @@ -552,6 +552,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Remove wallpaper during incoming sessions", ""), ("Test", ""), ("switch_display_elevated_connections_tip", ""), + ("capture_display_elevated_connections_tip", ""), ("display_is_plugged_out_msg", ""), ("No displays", ""), ("elevated_switch_display_msg", ""), diff --git a/src/lang/sr.rs b/src/lang/sr.rs index ae4c4e364..b43735501 100644 --- a/src/lang/sr.rs +++ b/src/lang/sr.rs @@ -552,6 +552,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Remove wallpaper during incoming sessions", ""), ("Test", ""), ("switch_display_elevated_connections_tip", ""), + ("capture_display_elevated_connections_tip", ""), ("display_is_plugged_out_msg", ""), ("No displays", ""), ("elevated_switch_display_msg", ""), diff --git a/src/lang/sv.rs b/src/lang/sv.rs index cfefe48a1..d634a120c 100644 --- a/src/lang/sv.rs +++ b/src/lang/sv.rs @@ -552,6 +552,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Remove wallpaper during incoming sessions", ""), ("Test", ""), ("switch_display_elevated_connections_tip", ""), + ("capture_display_elevated_connections_tip", ""), ("display_is_plugged_out_msg", ""), ("No displays", ""), ("elevated_switch_display_msg", ""), diff --git a/src/lang/template.rs b/src/lang/template.rs index e3f8f6f38..d59a02031 100644 --- a/src/lang/template.rs +++ b/src/lang/template.rs @@ -552,6 +552,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Remove wallpaper during incoming sessions", ""), ("Test", ""), ("switch_display_elevated_connections_tip", ""), + ("capture_display_elevated_connections_tip", ""), ("display_is_plugged_out_msg", ""), ("No displays", ""), ("elevated_switch_display_msg", ""), diff --git a/src/lang/th.rs b/src/lang/th.rs index ea3a72af2..aafe52bef 100644 --- a/src/lang/th.rs +++ b/src/lang/th.rs @@ -552,6 +552,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Remove wallpaper during incoming sessions", ""), ("Test", ""), ("switch_display_elevated_connections_tip", ""), + ("capture_display_elevated_connections_tip", ""), ("display_is_plugged_out_msg", ""), ("No displays", ""), ("elevated_switch_display_msg", ""), diff --git a/src/lang/tr.rs b/src/lang/tr.rs index e14be47db..dc3d6fe55 100644 --- a/src/lang/tr.rs +++ b/src/lang/tr.rs @@ -552,6 +552,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Remove wallpaper during incoming sessions", ""), ("Test", ""), ("switch_display_elevated_connections_tip", ""), + ("capture_display_elevated_connections_tip", ""), ("display_is_plugged_out_msg", ""), ("No displays", ""), ("elevated_switch_display_msg", ""), diff --git a/src/lang/tw.rs b/src/lang/tw.rs index 57b7d7b9f..f12d616a8 100644 --- a/src/lang/tw.rs +++ b/src/lang/tw.rs @@ -552,6 +552,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Remove wallpaper during incoming sessions", ""), ("Test", ""), ("switch_display_elevated_connections_tip", ""), + ("capture_display_elevated_connections_tip", ""), ("display_is_plugged_out_msg", ""), ("No displays", ""), ("elevated_switch_display_msg", ""), diff --git a/src/lang/ua.rs b/src/lang/ua.rs index 6fa172311..760cf9afe 100644 --- a/src/lang/ua.rs +++ b/src/lang/ua.rs @@ -552,6 +552,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Remove wallpaper during incoming sessions", "Прибирати шпалеру під час вхідних сеансів"), ("Test", "Тест"), ("switch_display_elevated_connections_tip", "В режимі розширених прав, коли є декілька підключень, не підтримується перемикання на неосновний дисплей. Якщо вам потрібен контроль декількох дисплеїв, будь ласка, спробуйте ще раз після встановлення"), + ("capture_display_elevated_connections_tip", ""), ("display_is_plugged_out_msg", "Дисплей відключено, перемкніться на перший дисплей"), ("No displays", "Відсутні дисплеї"), ("elevated_switch_display_msg", "Перемкніться на основний дисплей, оскільки в режимі розширених прав одночасне використання декілька дисплеїв не підтримуються."), diff --git a/src/lang/vn.rs b/src/lang/vn.rs index 84b0bf752..f88824779 100644 --- a/src/lang/vn.rs +++ b/src/lang/vn.rs @@ -552,6 +552,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Remove wallpaper during incoming sessions", ""), ("Test", ""), ("switch_display_elevated_connections_tip", ""), + ("capture_display_elevated_connections_tip", ""), ("display_is_plugged_out_msg", ""), ("No displays", ""), ("elevated_switch_display_msg", ""), diff --git a/src/server/connection.rs b/src/server/connection.rs index b4da0e45e..191ba0a32 100644 --- a/src/server/connection.rs +++ b/src/server/connection.rs @@ -2326,6 +2326,22 @@ impl Connection { } async fn capture_displays(&mut self, add: &[usize], sub: &[usize], set: &[usize]) { + #[cfg(windows)] + if portable_client::running() && (add.len() > 0 || set.len() > 1) { + log::info!("Capturing multiple displays is not supported in the elevated mode."); + let mut msg_out = Message::new(); + let res = MessageBox { + msgtype: "nook-nocancel-hasclose".to_owned(), + title: "Prompt".to_owned(), + text: "switch_display_elevated_connections_tip".to_owned(), + link: "".to_owned(), + ..Default::default() + }; + msg_out.set_message_box(res); + self.send(msg_out).await; + return; + } + if let Some(sever) = self.server.upgrade() { let mut lock = sever.write().unwrap(); for display in add.iter() { diff --git a/src/server/portable_service.rs b/src/server/portable_service.rs index ddca2e774..396f04ac1 100644 --- a/src/server/portable_service.rs +++ b/src/server/portable_service.rs @@ -878,15 +878,7 @@ pub mod client { } if portable_service_running { log::info!("Create shared memory capturer"); - if current_display == *display_service::PRIMARY_DISPLAY_IDX { - return Ok(Box::new(CapturerPortable::new(current_display))); - } else { - bail!( - "Ignore capture display index: {}, the primary display index is: {}", - current_display, - *display_service::PRIMARY_DISPLAY_IDX - ); - } + return Ok(Box::new(CapturerPortable::new(current_display))); } else { log::debug!("Create capturer dxgi|gdi"); return Ok(Box::new( From 44cba7adf7aba5aede0bfd20555a3cc45fc4ffc7 Mon Sep 17 00:00:00 2001 From: fufesou Date: Wed, 29 Nov 2023 23:50:17 +0800 Subject: [PATCH 2/4] fix, prompt msg Signed-off-by: fufesou --- src/server/connection.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/server/connection.rs b/src/server/connection.rs index 191ba0a32..8ec3e561c 100644 --- a/src/server/connection.rs +++ b/src/server/connection.rs @@ -2333,7 +2333,7 @@ impl Connection { let res = MessageBox { msgtype: "nook-nocancel-hasclose".to_owned(), title: "Prompt".to_owned(), - text: "switch_display_elevated_connections_tip".to_owned(), + text: "capture_display_elevated_connections_tip".to_owned(), link: "".to_owned(), ..Default::default() }; From b7b0a44c528863405395924f38af37ecec826285 Mon Sep 17 00:00:00 2001 From: RustDesk <71636191+rustdesk@users.noreply.github.com> Date: Thu, 30 Nov 2023 00:16:13 +0800 Subject: [PATCH 3/4] Update en.rs --- src/lang/en.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lang/en.rs b/src/lang/en.rs index fd21d62a9..208029423 100644 --- a/src/lang/en.rs +++ b/src/lang/en.rs @@ -198,10 +198,10 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("upgrade_rustdesk_server_pro_to_{}_tip", "Please upgrade RustDesk Server Pro to version {} or newer!"), ("pull_group_failed_tip", "Failed to refresh group"), ("doc_fix_wayland", "https://rustdesk.com/docs/en/manual/linux/#x11-required"), - ("switch_display_elevated_connections_tip", "Switching to non-primary display is not supported in the elevated mode when there are multiple connections. Please try again after installation if you want to control multiple displays."), - ("capture_display_elevated_connections_tip", "Capturing multiple displays is not supported in the elevated mode. Please try again after installation if you want to control multiple displays."), + ("switch_display_elevated_connections_tip", "Switching to non-primary display is not supported in the elevated user mode when there are multiple connections. Please try again after installation if you want to control multiple displays."), + ("capture_display_elevated_connections_tip", "Capturing multiple displays is not supported in the elevated user mode. Please try again after installation if you want to control multiple displays."), ("display_is_plugged_out_msg", "The display is plugged out, switch to the first display."), - ("elevated_switch_display_msg", "Switch to the primary display because multiple displays are not supported in elevated mode."), + ("elevated_switch_display_msg", "Switch to the primary display because multiple displays are not supported in elevated user mode."), ("selinux_tip", "SELinux is enabled on your device, which may prevent RustDesk from running properly as controlled side."), ("id_input_tip", "You can input an ID, a direct IP, or a domain with a port (:).\nIf you want to access a device on another server, please append the server address (@?key=), for example,\n9123456234@192.168.16.1:21117?key=5Qbwsde3unUcJBtrx9ZkvUmwFNoExHzpryHuPUdqlWM=.\nIf you want to access a device on a public server, please input \"@public\", the key is not needed for public server"), ("privacy_mode_impl_mag_tip", "Mode 1"), From d66e087d94c15206e2ec1ab2f2b298c6f6c32cf0 Mon Sep 17 00:00:00 2001 From: RustDesk <71636191+rustdesk@users.noreply.github.com> Date: Thu, 30 Nov 2023 00:17:58 +0800 Subject: [PATCH 4/4] Update cn.rs --- src/lang/cn.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lang/cn.rs b/src/lang/cn.rs index 68fa2d732..b4b211608 100644 --- a/src/lang/cn.rs +++ b/src/lang/cn.rs @@ -551,11 +551,11 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Filter by intersection", "按交集过滤"), ("Remove wallpaper during incoming sessions", "接受会话时移除桌面壁纸"), ("Test", "测试"), - ("switch_display_elevated_connections_tip", "提权后,被控有多个连接,不能切换到非主显示器。若要控制多显示器,请安装后再试。"), - ("capture_display_elevated_connections_tip", "提权后,不能显示多个显示器。若要控制多显示器,请安装后再试。"), + ("switch_display_elevated_connections_tip", "用户提权后,被控有多个连接,不能切换到非主显示器。若要控制多显示器,请安装后再试。"), + ("capture_display_elevated_connections_tip", "用户提权后,不能显示多个显示器。若要控制多显示器,请安装后再试。"), ("display_is_plugged_out_msg", "显示器被拔出,切换到第一个显示器。"), ("No displays", "没有显示器。"), - ("elevated_switch_display_msg", "切换到主显示器,因为提权后,不支持多显示器画面。"), + ("elevated_switch_display_msg", "切换到主显示器,因为用户提权后,不支持多显示器画面。"), ("Open in new window", "在新的窗口中打开"), ("Show displays as individual windows", "在单个窗口中打开显示器"), ("Use all my displays for the remote session", "将我的所有显示器用于远程会话"),