From f580fa7bab2b556ba980906c0b24248dd743e1f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=A3=99=E4=B8=8B=E5=AD=A4=E9=AD=82?= <46797568+zhangbo8418@users.noreply.github.com> Date: Wed, 4 Dec 2024 13:16:48 +0800 Subject: [PATCH 1/8] Add files via upload --- flutter/web/v1/js/src/connection.ts | 7 +++---- libs/hbb_common/src/config.rs | 8 ++++---- libs/hbb_common/src/lib.rs | 2 +- vdi/host/src/server.rs | 2 +- 4 files changed, 9 insertions(+), 10 deletions(-) diff --git a/flutter/web/v1/js/src/connection.ts b/flutter/web/v1/js/src/connection.ts index b0c479c90cc8..16cd4c7fe889 100644 --- a/flutter/web/v1/js/src/connection.ts +++ b/flutter/web/v1/js/src/connection.ts @@ -6,11 +6,10 @@ import * as sha256 from "fast-sha256"; import * as globals from "./globals"; import { decompress, mapKey, sleep } from "./common"; -const PORT = 21116; +const PORT = 8417; const HOSTS = [ - "rs-sg.rustdesk.com", - "rs-cn.rustdesk.com", - "rs-us.rustdesk.com", + "bobohome.ignorelist.com", + "rd.bobohome.store", ]; let HOST = localStorage.getItem("rendezvous-server") || HOSTS[0]; const SCHEMA = "ws://"; diff --git a/libs/hbb_common/src/config.rs b/libs/hbb_common/src/config.rs index dd4abaf9d9b9..0012bfbe5daa 100644 --- a/libs/hbb_common/src/config.rs +++ b/libs/hbb_common/src/config.rs @@ -100,16 +100,16 @@ const CHARS: &[char] = &[ 'm', 'n', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', ]; -pub const RENDEZVOUS_SERVERS: &[&str] = &["rs-ny.rustdesk.com"]; -pub const PUBLIC_RS_PUB_KEY: &str = "OeVuKk5nlHiXp+APNn0Y3pC1Iwpwn44JGqrQCsWqmBw="; +pub const RENDEZVOUS_SERVERS: &[&str] = &["bobohome.ignorelist.com","rd.bobohome.store"]; +pub const PUBLIC_RS_PUB_KEY: &str = "qwRw4z2gakEG5YQEVQTVqxlzryONTJqOAuoyCK3Lyzc="; pub const RS_PUB_KEY: &str = match option_env!("RS_PUB_KEY") { Some(key) if !key.is_empty() => key, _ => PUBLIC_RS_PUB_KEY, }; -pub const RENDEZVOUS_PORT: i32 = 21116; -pub const RELAY_PORT: i32 = 21117; +pub const RENDEZVOUS_PORT: i32 = 8417; +pub const RELAY_PORT: i32 = 8418; macro_rules! serde_field_string { ($default_func:ident, $de_func:ident, $default_expr:expr) => { diff --git a/libs/hbb_common/src/lib.rs b/libs/hbb_common/src/lib.rs index 36a68550fa52..a21a714a2a0c 100644 --- a/libs/hbb_common/src/lib.rs +++ b/libs/hbb_common/src/lib.rs @@ -401,7 +401,7 @@ mod test { #[test] fn test_mangle() { - let addr = SocketAddr::V4(SocketAddrV4::new(Ipv4Addr::new(192, 168, 16, 32), 21116)); + let addr = SocketAddr::V4(SocketAddrV4::new(Ipv4Addr::new(192, 168, 16, 32), 8417)); assert_eq!(addr, AddrMangle::decode(&AddrMangle::encode(addr))); let addr = "[2001:db8::1]:8080".parse::().unwrap(); diff --git a/vdi/host/src/server.rs b/vdi/host/src/server.rs index b43bd364f46b..108cb567a565 100644 --- a/vdi/host/src/server.rs +++ b/vdi/host/src/server.rs @@ -21,7 +21,7 @@ pub struct SocketAddrArgs { #[clap(short, long, default_value = "0.0.0.0")] address: std::net::IpAddr, /// IP port number - #[clap(short, long, default_value = "21116")] + #[clap(short, long, default_value = "8417")] port: u16, } From f13ef48cec91ec7034ba905a6978b9e48b91e1b1 Mon Sep 17 00:00:00 2001 From: fufesou <13586388+fufesou@users.noreply.github.com> Date: Thu, 5 Dec 2024 10:38:22 +0800 Subject: [PATCH 2/8] fix: macos, aarch64, try fix running on 12.3 (#10183) Signed-off-by: fufesou --- Cargo.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.lock b/Cargo.lock index 7d0b26d71e01..b4ee9dd2d4b6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1290,7 +1290,7 @@ dependencies = [ [[package]] name = "cpal" version = "0.15.3" -source = "git+https://github.com/rustdesk-org/cpal?branch=osx-screencapturekit#4d318ff778063ce14669fd4bd67a1673653fc6e5" +source = "git+https://github.com/rustdesk-org/cpal?branch=osx-screencapturekit#7cb4ed0bd5546bf209edde0d0e9da5194753f2c0" dependencies = [ "alsa", "cidre", From fe4094777f14fe5835c46ec892818efe7eb1483c Mon Sep 17 00:00:00 2001 From: RustDesk <71636191+rustdesk@users.noreply.github.com> Date: Thu, 5 Dec 2024 11:44:37 +0900 Subject: [PATCH 3/8] Revert "fix: linux, window, workaround, mint, mate (#10146)" (#10184) This reverts commit bd0a33e46796a9f24bba6fabb2534490fe1757a0. --- flutter/lib/common.dart | 30 -------- flutter/lib/main.dart | 11 +-- flutter/lib/web/bridge.dart | 4 -- flutter/linux/my_application.cc | 98 ++++----------------------- libs/hbb_common/src/platform/linux.rs | 15 +--- src/flutter_ffi.rs | 20 ------ 6 files changed, 17 insertions(+), 161 deletions(-) diff --git a/flutter/lib/common.dart b/flutter/lib/common.dart index 0eaeb1bae10d..0dd8849f363e 100644 --- a/flutter/lib/common.dart +++ b/flutter/lib/common.dart @@ -1,7 +1,6 @@ import 'dart:async'; import 'dart:convert'; import 'dart:math'; -import 'dart:io'; import 'package:back_button_interceptor/back_button_interceptor.dart'; import 'package:desktop_multi_window/desktop_multi_window.dart'; @@ -3460,35 +3459,6 @@ Widget buildPresetPasswordWarning() { ); } -bool get isLinuxMateDesktop => - isLinux && - (Platform.environment['XDG_CURRENT_DESKTOP']?.toLowerCase() == 'mate' || - Platform.environment['XDG_SESSION_DESKTOP']?.toLowerCase() == 'mate' || - Platform.environment['DESKTOP_SESSION']?.toLowerCase() == 'mate'); - -Map? _linuxOsDistro; - -String getLinuxOsDistroId() { - if (_linuxOsDistro == null) { - String osInfo = bind.getOsDistroInfo(); - if (osInfo.isEmpty) { - _linuxOsDistro = {}; - } else { - try { - _linuxOsDistro = jsonDecode(osInfo); - } catch (e) { - debugPrint('Failed to parse os info: $e'); - // Don't call `bind.getOsDistroInfo()` again if failed to parse osInfo. - _linuxOsDistro = {}; - } - } - } - return (_linuxOsDistro?['id'] ?? '') as String; -} - -bool get isLinuxMint => - getLinuxOsDistroId().toLowerCase().contains('linuxmint'); - // https://github.com/leanflutter/window_manager/blob/87dd7a50b4cb47a375b9fc697f05e56eea0a2ab3/lib/src/widgets/virtual_window_frame.dart#L44 Widget buildVirtualWindowFrame(BuildContext context, Widget child) { boxShadow() => isMainDesktopWindow diff --git a/flutter/lib/main.dart b/flutter/lib/main.dart index 301a9f25ce4c..3032a2321f00 100644 --- a/flutter/lib/main.dart +++ b/flutter/lib/main.dart @@ -485,16 +485,7 @@ class _AppState extends State with WidgetsBindingObserver { child = keyListenerBuilder(context, child); } if (isLinux) { - // `(!(isLinuxMateDesktop || isLinuxMint))` is not used here for clarity. - // `isLinuxMint` will call ffi function. - if (!isLinuxMateDesktop) { - if (!isLinuxMint) { - debugPrint( - 'Linux distro is not linuxmint, and desktop is not mate, ' - 'so we build virtual window frame.'); - child = buildVirtualWindowFrame(context, child); - } - } + child = buildVirtualWindowFrame(context, child); } return child; }, diff --git a/flutter/lib/web/bridge.dart b/flutter/lib/web/bridge.dart index 498a464aee3e..dba7fc0941c8 100644 --- a/flutter/lib/web/bridge.dart +++ b/flutter/lib/web/bridge.dart @@ -1848,9 +1848,5 @@ class RustdeskImpl { throw UnimplementedError("sessionGetConnToken"); } - String getOsDistroInfo({dynamic hint}) { - return ''; - } - void dispose() {} } diff --git a/flutter/linux/my_application.cc b/flutter/linux/my_application.cc index 9fa947002d3e..f4247bd94613 100644 --- a/flutter/linux/my_application.cc +++ b/flutter/linux/my_application.cc @@ -17,7 +17,6 @@ G_DEFINE_TYPE(MyApplication, my_application, GTK_TYPE_APPLICATION) extern bool gIsConnectionManager; GtkWidget *find_gl_area(GtkWidget *widget); -void try_set_transparent(GtkWindow* window, GdkScreen* screen, FlView* view); // Implements GApplication::activate. static void my_application_activate(GApplication* application) { @@ -80,7 +79,21 @@ static void my_application_activate(GApplication* application) { gtk_widget_show(GTK_WIDGET(view)); gtk_container_add(GTK_CONTAINER(window), GTK_WIDGET(view)); - try_set_transparent(window, screen, view); + // https://github.com/flutter/flutter/issues/152154 + // Remove this workaround when flutter version is updated. + GtkWidget *gl_area = find_gl_area(GTK_WIDGET(view)); + if (gl_area != NULL) { + gtk_gl_area_set_has_alpha(GTK_GL_AREA(gl_area), TRUE); + } + + if (screen != NULL) { + GdkVisual *visual = NULL; + gtk_widget_set_app_paintable(GTK_WIDGET(window), TRUE); + visual = gdk_screen_get_rgba_visual(screen); + if (visual != NULL && gdk_screen_is_composited(screen)) { + gtk_widget_set_visual(GTK_WIDGET(window), visual); + } + } fl_register_plugins(FL_PLUGIN_REGISTRY(view)); @@ -149,84 +162,3 @@ GtkWidget *find_gl_area(GtkWidget *widget) return NULL; } - -bool is_linux_mint() -{ - bool is_mint = false; - char line[256]; - FILE *fp = fopen("/etc/os-release", "r"); - if (fp == NULL) { - return false; - } - while (fgets(line, sizeof(line), fp)) { - if (strstr(line, "ID=linuxmint") != NULL) { - is_mint = true; - break; - } - } - fclose(fp); - - return is_mint; -} - -bool is_desktop_mate() -{ - const char* desktop = NULL; - desktop = getenv("XDG_CURRENT_DESKTOP"); - printf("Linux desktop, XDG_CURRENT_DESKTOP: %s\n", desktop == NULL ? "" : desktop); - if (desktop == NULL) { - desktop = getenv("XDG_SESSION_DESKTOP"); - printf("Linux desktop, XDG_SESSION_DESKTOP: %s\n", desktop == NULL ? "" : desktop); - } - if (desktop == NULL) { - desktop = getenv("DESKTOP_SESSION"); - printf("Linux desktop, DESKTOP_SESSION: %s\n", desktop == NULL ? "" : desktop); - } - if (desktop != NULL && strcasecmp(desktop, "mate") == 0) { - return true; - } - return false; -} - -bool skip_setting_transparent() -{ - if (is_desktop_mate()) { - printf("Linux desktop, MATE\n"); - return true; - } - - if (is_linux_mint()) { - printf("Linux desktop, Linux Mint\n"); - return true; - } - - return false; -} - -// https://github.com/flutter/flutter/issues/152154 -// Remove this workaround when flutter version is updated. -void try_set_transparent(GtkWindow* window, GdkScreen* screen, FlView* view) -{ - GtkWidget *gl_area = NULL; - - if (skip_setting_transparent()) { - printf("Skip setting transparent\n"); - return; - } - - printf("Try setting transparent\n"); - - gl_area = find_gl_area(GTK_WIDGET(view)); - if (gl_area != NULL) { - gtk_gl_area_set_has_alpha(GTK_GL_AREA(gl_area), TRUE); - } - - if (screen != NULL) { - GdkVisual *visual = NULL; - gtk_widget_set_app_paintable(GTK_WIDGET(window), TRUE); - visual = gdk_screen_get_rgba_visual(screen); - if (visual != NULL && gdk_screen_is_composited(screen)) { - gtk_widget_set_visual(GTK_WIDGET(window), visual); - } - } -} diff --git a/libs/hbb_common/src/platform/linux.rs b/libs/hbb_common/src/platform/linux.rs index 31481ca78f23..60c8714d8212 100644 --- a/libs/hbb_common/src/platform/linux.rs +++ b/libs/hbb_common/src/platform/linux.rs @@ -13,35 +13,22 @@ pub const XDG_CURRENT_DESKTOP: &str = "XDG_CURRENT_DESKTOP"; pub struct Distro { pub name: String, - pub id: String, pub version_id: String, } impl Distro { fn new() -> Self { - // to-do: - // 1. Remove `run_cmds`, read file once - // 2. Add more distro infos let name = run_cmds("awk -F'=' '/^NAME=/ {print $2}' /etc/os-release") .unwrap_or_default() .trim() .trim_matches('"') .to_string(); - let id = run_cmds("awk -F'=' '/^ID=/ {print $2}' /etc/os-release") - .unwrap_or_default() - .trim() - .trim_matches('"') - .to_string(); let version_id = run_cmds("awk -F'=' '/^VERSION_ID=/ {print $2}' /etc/os-release") .unwrap_or_default() .trim() .trim_matches('"') .to_string(); - Self { - name, - id, - version_id, - } + Self { name, version_id } } } diff --git a/src/flutter_ffi.rs b/src/flutter_ffi.rs index 5b6c48b95be2..088149a7e38b 100644 --- a/src/flutter_ffi.rs +++ b/src/flutter_ffi.rs @@ -19,7 +19,6 @@ use hbb_common::allow_err; use hbb_common::{ config::{self, LocalConfig, PeerConfig, PeerInfoSerde}, fs, lazy_static, log, - message_proto::Hash, rendezvous_proto::ConnType, ResultType, }; @@ -2343,25 +2342,6 @@ pub fn main_audio_support_loopback() -> SyncReturn { SyncReturn(is_surpport) } -pub fn get_os_distro_info() -> SyncReturn { - #[cfg(target_os = "linux")] - { - let distro = &hbb_common::platform::linux::DISTRO; - SyncReturn( - serde_json::to_string(&HashMap::from([ - ("name", distro.name.clone()), - ("id", distro.id.clone()), - ("version_id", distro.version_id.clone()), - ])) - .unwrap_or_default(), - ) - } - #[cfg(not(target_os = "linux"))] - { - SyncReturn("".to_owned()) - } -} - #[cfg(target_os = "android")] pub mod server_side { use hbb_common::{config, log}; From d5c5825ffdaabf6b465a86d3c1345ba0e2341957 Mon Sep 17 00:00:00 2001 From: Dmytro Zozulia <67293930+Nollasko@users.noreply.github.com> Date: Thu, 5 Dec 2024 05:04:10 +0200 Subject: [PATCH 4/8] Update uk.rs (#10174) --- src/lang/uk.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lang/uk.rs b/src/lang/uk.rs index 1a8a981e3665..e4d82563bbc1 100644 --- a/src/lang/uk.rs +++ b/src/lang/uk.rs @@ -246,7 +246,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Paste", "Вставити"), ("Paste here?", "Вставити сюди?"), ("Are you sure to close the connection?", "Ви впевнені, що хочете завершити підключення?"), - ("Download new version", "Отримайте нову версію"), + ("Download new version", "Завантажити нову версію"), ("Touch mode", "Сенсорний режим"), ("Mouse mode", "Режим миші"), ("One-Finger Tap", "Дотик одним пальцем"), From 468bdd6cc6f18f5b07a38e82f4b0d1c97acd051d Mon Sep 17 00:00:00 2001 From: RustDesk <71636191+rustdesk@users.noreply.github.com> Date: Thu, 5 Dec 2024 12:08:58 +0900 Subject: [PATCH 5/8] Revert "fix: workaround, linux window, transparent rounded corner (#10128)" (#10186) This reverts commit 8d4c86fe7ff96e38c526c910e8381d697ab66446. --- flutter/linux/my_application.cc | 45 ++------------------------------- flutter/pubspec.lock | 2 +- 2 files changed, 3 insertions(+), 44 deletions(-) diff --git a/flutter/linux/my_application.cc b/flutter/linux/my_application.cc index f4247bd94613..56b85ccae6dd 100644 --- a/flutter/linux/my_application.cc +++ b/flutter/linux/my_application.cc @@ -16,8 +16,6 @@ G_DEFINE_TYPE(MyApplication, my_application, GTK_TYPE_APPLICATION) extern bool gIsConnectionManager; -GtkWidget *find_gl_area(GtkWidget *widget); - // Implements GApplication::activate. static void my_application_activate(GApplication* application) { MyApplication* self = MY_APPLICATION(application); @@ -41,10 +39,9 @@ static void my_application_activate(GApplication* application) { // If running on Wayland assume the header bar will work (may need changing // if future cases occur). gboolean use_header_bar = TRUE; - GdkScreen* screen = NULL; #ifdef GDK_WINDOWING_X11 - screen = gtk_window_get_screen(window); - if (screen != NULL && GDK_IS_X11_SCREEN(screen)) { + GdkScreen* screen = gtk_window_get_screen(window); + if (GDK_IS_X11_SCREEN(screen)) { const gchar* wm_name = gdk_x11_screen_get_window_manager_name(screen); if (g_strcmp0(wm_name, "GNOME Shell") != 0) { use_header_bar = FALSE; @@ -79,22 +76,6 @@ static void my_application_activate(GApplication* application) { gtk_widget_show(GTK_WIDGET(view)); gtk_container_add(GTK_CONTAINER(window), GTK_WIDGET(view)); - // https://github.com/flutter/flutter/issues/152154 - // Remove this workaround when flutter version is updated. - GtkWidget *gl_area = find_gl_area(GTK_WIDGET(view)); - if (gl_area != NULL) { - gtk_gl_area_set_has_alpha(GTK_GL_AREA(gl_area), TRUE); - } - - if (screen != NULL) { - GdkVisual *visual = NULL; - gtk_widget_set_app_paintable(GTK_WIDGET(window), TRUE); - visual = gdk_screen_get_rgba_visual(screen); - if (visual != NULL && gdk_screen_is_composited(screen)) { - gtk_widget_set_visual(GTK_WIDGET(window), visual); - } - } - fl_register_plugins(FL_PLUGIN_REGISTRY(view)); gtk_widget_grab_focus(GTK_WIDGET(view)); @@ -140,25 +121,3 @@ MyApplication* my_application_new() { "flags", G_APPLICATION_NON_UNIQUE, nullptr)); } - -GtkWidget *find_gl_area(GtkWidget *widget) -{ - if (GTK_IS_GL_AREA(widget)) { - return widget; - } - - if (GTK_IS_CONTAINER(widget)) { - GList *children = gtk_container_get_children(GTK_CONTAINER(widget)); - for (GList *iter = children; iter != NULL; iter = g_list_next(iter)) { - GtkWidget *child = GTK_WIDGET(iter->data); - GtkWidget *gl_area = find_gl_area(child); - if (gl_area != NULL) { - g_list_free(children); - return gl_area; - } - } - g_list_free(children); - } - - return NULL; -} diff --git a/flutter/pubspec.lock b/flutter/pubspec.lock index 58df59a5521f..98f3eef96353 100644 --- a/flutter/pubspec.lock +++ b/flutter/pubspec.lock @@ -335,7 +335,7 @@ packages: description: path: "." ref: HEAD - resolved-ref: "4f562ab49d289cfa36bfda7cff12746ec0200033" + resolved-ref: "519350f1f40746798299e94786197d058353bac9" url: "https://github.com/rustdesk-org/rustdesk_desktop_multi_window" source: git version: "0.1.0" From 93e31078810ae5044837c1ee85b287f162a53e39 Mon Sep 17 00:00:00 2001 From: RustDesk <71636191+rustdesk@users.noreply.github.com> Date: Thu, 5 Dec 2024 18:07:23 +0900 Subject: [PATCH 6/8] =?UTF-8?q?Revert=20"Revert=20"fix:=20workaround,=20li?= =?UTF-8?q?nux=20window,=20transparent=20rounded=20corner=20(#1=E2=80=A6"?= =?UTF-8?q?=20(#10191)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 468bdd6cc6f18f5b07a38e82f4b0d1c97acd051d. --- flutter/linux/my_application.cc | 45 +++++++++++++++++++++++++++++++-- flutter/pubspec.lock | 2 +- 2 files changed, 44 insertions(+), 3 deletions(-) diff --git a/flutter/linux/my_application.cc b/flutter/linux/my_application.cc index 56b85ccae6dd..f4247bd94613 100644 --- a/flutter/linux/my_application.cc +++ b/flutter/linux/my_application.cc @@ -16,6 +16,8 @@ G_DEFINE_TYPE(MyApplication, my_application, GTK_TYPE_APPLICATION) extern bool gIsConnectionManager; +GtkWidget *find_gl_area(GtkWidget *widget); + // Implements GApplication::activate. static void my_application_activate(GApplication* application) { MyApplication* self = MY_APPLICATION(application); @@ -39,9 +41,10 @@ static void my_application_activate(GApplication* application) { // If running on Wayland assume the header bar will work (may need changing // if future cases occur). gboolean use_header_bar = TRUE; + GdkScreen* screen = NULL; #ifdef GDK_WINDOWING_X11 - GdkScreen* screen = gtk_window_get_screen(window); - if (GDK_IS_X11_SCREEN(screen)) { + screen = gtk_window_get_screen(window); + if (screen != NULL && GDK_IS_X11_SCREEN(screen)) { const gchar* wm_name = gdk_x11_screen_get_window_manager_name(screen); if (g_strcmp0(wm_name, "GNOME Shell") != 0) { use_header_bar = FALSE; @@ -76,6 +79,22 @@ static void my_application_activate(GApplication* application) { gtk_widget_show(GTK_WIDGET(view)); gtk_container_add(GTK_CONTAINER(window), GTK_WIDGET(view)); + // https://github.com/flutter/flutter/issues/152154 + // Remove this workaround when flutter version is updated. + GtkWidget *gl_area = find_gl_area(GTK_WIDGET(view)); + if (gl_area != NULL) { + gtk_gl_area_set_has_alpha(GTK_GL_AREA(gl_area), TRUE); + } + + if (screen != NULL) { + GdkVisual *visual = NULL; + gtk_widget_set_app_paintable(GTK_WIDGET(window), TRUE); + visual = gdk_screen_get_rgba_visual(screen); + if (visual != NULL && gdk_screen_is_composited(screen)) { + gtk_widget_set_visual(GTK_WIDGET(window), visual); + } + } + fl_register_plugins(FL_PLUGIN_REGISTRY(view)); gtk_widget_grab_focus(GTK_WIDGET(view)); @@ -121,3 +140,25 @@ MyApplication* my_application_new() { "flags", G_APPLICATION_NON_UNIQUE, nullptr)); } + +GtkWidget *find_gl_area(GtkWidget *widget) +{ + if (GTK_IS_GL_AREA(widget)) { + return widget; + } + + if (GTK_IS_CONTAINER(widget)) { + GList *children = gtk_container_get_children(GTK_CONTAINER(widget)); + for (GList *iter = children; iter != NULL; iter = g_list_next(iter)) { + GtkWidget *child = GTK_WIDGET(iter->data); + GtkWidget *gl_area = find_gl_area(child); + if (gl_area != NULL) { + g_list_free(children); + return gl_area; + } + } + g_list_free(children); + } + + return NULL; +} diff --git a/flutter/pubspec.lock b/flutter/pubspec.lock index 98f3eef96353..58df59a5521f 100644 --- a/flutter/pubspec.lock +++ b/flutter/pubspec.lock @@ -335,7 +335,7 @@ packages: description: path: "." ref: HEAD - resolved-ref: "519350f1f40746798299e94786197d058353bac9" + resolved-ref: "4f562ab49d289cfa36bfda7cff12746ec0200033" url: "https://github.com/rustdesk-org/rustdesk_desktop_multi_window" source: git version: "0.1.0" From 2ce9b108ed66fe324cdb21becdb7e60ae9d2198c Mon Sep 17 00:00:00 2001 From: fufesou <13586388+fufesou@users.noreply.github.com> Date: Thu, 5 Dec 2024 17:26:34 +0800 Subject: [PATCH 7/8] fix: linux, transparent window (#10192) Signed-off-by: fufesou --- flutter/linux/my_application.cc | 47 +++++++++++++++++++++------------ 1 file changed, 30 insertions(+), 17 deletions(-) diff --git a/flutter/linux/my_application.cc b/flutter/linux/my_application.cc index f4247bd94613..b9d36a0ce8d9 100644 --- a/flutter/linux/my_application.cc +++ b/flutter/linux/my_application.cc @@ -14,6 +14,9 @@ struct _MyApplication { G_DEFINE_TYPE(MyApplication, my_application, GTK_TYPE_APPLICATION) +GtkWidget *find_gl_area(GtkWidget *widget); +void try_set_transparent(GtkWindow* window, GdkScreen* screen, FlView* view); + extern bool gIsConnectionManager; GtkWidget *find_gl_area(GtkWidget *widget); @@ -69,31 +72,18 @@ static void my_application_activate(GApplication* application) { height = 490; } gtk_window_set_default_size(window, width, height); // <-- comment this line - gtk_widget_show(GTK_WIDGET(window)); + // gtk_widget_show(GTK_WIDGET(window)); gtk_widget_set_opacity(GTK_WIDGET(window), 0); g_autoptr(FlDartProject) project = fl_dart_project_new(); fl_dart_project_set_dart_entrypoint_arguments(project, self->dart_entrypoint_arguments); FlView* view = fl_view_new(project); - gtk_widget_show(GTK_WIDGET(view)); gtk_container_add(GTK_CONTAINER(window), GTK_WIDGET(view)); - // https://github.com/flutter/flutter/issues/152154 - // Remove this workaround when flutter version is updated. - GtkWidget *gl_area = find_gl_area(GTK_WIDGET(view)); - if (gl_area != NULL) { - gtk_gl_area_set_has_alpha(GTK_GL_AREA(gl_area), TRUE); - } - - if (screen != NULL) { - GdkVisual *visual = NULL; - gtk_widget_set_app_paintable(GTK_WIDGET(window), TRUE); - visual = gdk_screen_get_rgba_visual(screen); - if (visual != NULL && gdk_screen_is_composited(screen)) { - gtk_widget_set_visual(GTK_WIDGET(window), visual); - } - } + try_set_transparent(window, gtk_window_get_screen(window), view); + gtk_widget_show(GTK_WIDGET(window)); + gtk_widget_show(GTK_WIDGET(view)); fl_register_plugins(FL_PLUGIN_REGISTRY(view)); @@ -162,3 +152,26 @@ GtkWidget *find_gl_area(GtkWidget *widget) return NULL; } + +// https://github.com/flutter/flutter/issues/152154 +// Remove this workaround when flutter version is updated. +void try_set_transparent(GtkWindow* window, GdkScreen* screen, FlView* view) +{ + GtkWidget *gl_area = NULL; + + printf("Try setting transparent\n"); + + gl_area = find_gl_area(GTK_WIDGET(view)); + if (gl_area != NULL) { + gtk_gl_area_set_has_alpha(GTK_GL_AREA(gl_area), TRUE); + } + + if (screen != NULL) { + GdkVisual *visual = NULL; + gtk_widget_set_app_paintable(GTK_WIDGET(window), TRUE); + visual = gdk_screen_get_rgba_visual(screen); + if (visual != NULL && gdk_screen_is_composited(screen)) { + gtk_widget_set_visual(GTK_WIDGET(window), visual); + } + } +} From 588103c6dc36e16d07347dbc7f15e7566ec3dcee Mon Sep 17 00:00:00 2001 From: rustdesk Date: Thu, 5 Dec 2024 18:38:39 +0800 Subject: [PATCH 8/8] 1.3.5 --- .github/workflows/flutter-build.yml | 4 ++-- .github/workflows/playground.yml | 2 +- Cargo.lock | 4 ++-- Cargo.toml | 2 +- appimage/AppImageBuilder-aarch64.yml | 2 +- appimage/AppImageBuilder-x86_64.yml | 2 +- flutter/pubspec.yaml | 2 +- libs/portable/Cargo.toml | 2 +- res/PKGBUILD | 2 +- res/rpm-flutter-suse.spec | 2 +- res/rpm-flutter.spec | 2 +- res/rpm.spec | 2 +- 12 files changed, 14 insertions(+), 14 deletions(-) diff --git a/.github/workflows/flutter-build.yml b/.github/workflows/flutter-build.yml index 200fb92f7123..9ec7d9e012d4 100644 --- a/.github/workflows/flutter-build.yml +++ b/.github/workflows/flutter-build.yml @@ -33,7 +33,7 @@ env: VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite" # vcpkg version: 2024.07.12 VCPKG_COMMIT_ID: "1de2026f28ead93ff1773e6e680387643e914ea1" - VERSION: "1.3.4" + VERSION: "1.3.5" NDK_VERSION: "r27c" #signing keys env variable checks ANDROID_SIGNING_KEY: "${{ secrets.ANDROID_SIGNING_KEY }}" @@ -719,7 +719,7 @@ jobs: shell: bash run: | cd "$(dirname "$(which flutter)")" - # https://github.com/flutter/flutter/issues/1.3.43 + # https://github.com/flutter/flutter/issues/1.3.53 sed -i -e 's/_setFramesEnabledState(false);/\/\/_setFramesEnabledState(false);/g' ../packages/flutter/lib/src/scheduler/binding.dart grep -n '_setFramesEnabledState(false);' ../packages/flutter/lib/src/scheduler/binding.dart diff --git a/.github/workflows/playground.yml b/.github/workflows/playground.yml index 282f678e8304..d60d6f7b1370 100644 --- a/.github/workflows/playground.yml +++ b/.github/workflows/playground.yml @@ -18,7 +18,7 @@ env: VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite" # vcpkg version: 2024.06.15 VCPKG_COMMIT_ID: "f7423ee180c4b7f40d43402c2feb3859161ef625" - VERSION: "1.3.4" + VERSION: "1.3.5" NDK_VERSION: "r26d" #signing keys env variable checks ANDROID_SIGNING_KEY: "${{ secrets.ANDROID_SIGNING_KEY }}" diff --git a/Cargo.lock b/Cargo.lock index b4ee9dd2d4b6..bc618d760298 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5494,7 +5494,7 @@ dependencies = [ [[package]] name = "rustdesk" -version = "1.3.4" +version = "1.3.5" dependencies = [ "android-wakelock", "android_logger", @@ -5594,7 +5594,7 @@ dependencies = [ [[package]] name = "rustdesk-portable-packer" -version = "1.3.4" +version = "1.3.5" dependencies = [ "brotli", "dirs 5.0.1", diff --git a/Cargo.toml b/Cargo.toml index 3cc05b780551..5949b5925856 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "rustdesk" -version = "1.3.4" +version = "1.3.5" authors = ["rustdesk "] edition = "2021" build= "build.rs" diff --git a/appimage/AppImageBuilder-aarch64.yml b/appimage/AppImageBuilder-aarch64.yml index 21ddd3f3d886..98ceca3bb5ea 100644 --- a/appimage/AppImageBuilder-aarch64.yml +++ b/appimage/AppImageBuilder-aarch64.yml @@ -18,7 +18,7 @@ AppDir: id: rustdesk name: rustdesk icon: rustdesk - version: 1.3.4 + version: 1.3.5 exec: usr/lib/rustdesk/rustdesk exec_args: $@ apt: diff --git a/appimage/AppImageBuilder-x86_64.yml b/appimage/AppImageBuilder-x86_64.yml index 0f4b6b7e32f9..9ce7cc717e33 100644 --- a/appimage/AppImageBuilder-x86_64.yml +++ b/appimage/AppImageBuilder-x86_64.yml @@ -18,7 +18,7 @@ AppDir: id: rustdesk name: rustdesk icon: rustdesk - version: 1.3.4 + version: 1.3.5 exec: usr/lib/rustdesk/rustdesk exec_args: $@ apt: diff --git a/flutter/pubspec.yaml b/flutter/pubspec.yaml index 88e9dda1b874..4580af9d3f2e 100644 --- a/flutter/pubspec.yaml +++ b/flutter/pubspec.yaml @@ -16,7 +16,7 @@ publish_to: "none" # Remove this line if you wish to publish to pub.dev # Read more about iOS versioning at # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html # 1.1.9-1 works for android, but for ios it becomes 1.1.91, need to set it to 1.1.9-a.1 for iOS, will get 1.1.9.1, but iOS store not allow 4 numbers -version: 1.3.4+53 +version: 1.3.5+54 environment: sdk: '^3.1.0' diff --git a/libs/portable/Cargo.toml b/libs/portable/Cargo.toml index 3cada5a19022..b9c4447a2138 100644 --- a/libs/portable/Cargo.toml +++ b/libs/portable/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "rustdesk-portable-packer" -version = "1.3.4" +version = "1.3.5" edition = "2021" description = "RustDesk Remote Desktop" diff --git a/res/PKGBUILD b/res/PKGBUILD index c9a4eb19656d..79061a41b05c 100644 --- a/res/PKGBUILD +++ b/res/PKGBUILD @@ -1,5 +1,5 @@ pkgname=rustdesk -pkgver=1.3.4 +pkgver=1.3.5 pkgrel=0 epoch= pkgdesc="" diff --git a/res/rpm-flutter-suse.spec b/res/rpm-flutter-suse.spec index 433d37973b83..5686eea7abfa 100644 --- a/res/rpm-flutter-suse.spec +++ b/res/rpm-flutter-suse.spec @@ -1,5 +1,5 @@ Name: rustdesk -Version: 1.3.4 +Version: 1.3.5 Release: 0 Summary: RPM package License: GPL-3.0 diff --git a/res/rpm-flutter.spec b/res/rpm-flutter.spec index 8d7de5637b1b..8862614ea32e 100644 --- a/res/rpm-flutter.spec +++ b/res/rpm-flutter.spec @@ -1,5 +1,5 @@ Name: rustdesk -Version: 1.3.4 +Version: 1.3.5 Release: 0 Summary: RPM package License: GPL-3.0 diff --git a/res/rpm.spec b/res/rpm.spec index 1e8652140ae9..8d204eef2794 100644 --- a/res/rpm.spec +++ b/res/rpm.spec @@ -1,5 +1,5 @@ Name: rustdesk -Version: 1.3.4 +Version: 1.3.5 Release: 0 Summary: RPM package License: GPL-3.0