mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-04-09 01:11:28 +03:00
@@ -4,8 +4,11 @@ use scrap::{is_cursor_embedded, set_map_err, Capturer, Display, Frame, TraitCapt
|
||||
use std::io;
|
||||
use std::process::{Command, Output};
|
||||
|
||||
use crate::client::{
|
||||
SCRAP_OTHER_VERSION_OR_X11_REQUIRED, SCRAP_UBUNTU_HIGHER_REQUIRED, SCRAP_X11_REQUIRED,
|
||||
use crate::{
|
||||
client::{
|
||||
SCRAP_OTHER_VERSION_OR_X11_REQUIRED, SCRAP_UBUNTU_HIGHER_REQUIRED, SCRAP_X11_REQUIRED,
|
||||
},
|
||||
platform::linux::is_x11,
|
||||
};
|
||||
|
||||
lazy_static::lazy_static! {
|
||||
@@ -96,7 +99,7 @@ pub(super) async fn ensure_inited() -> ResultType<()> {
|
||||
}
|
||||
|
||||
pub(super) fn is_inited() -> Option<Message> {
|
||||
if scrap::is_x11() {
|
||||
if is_x11() {
|
||||
None
|
||||
} else {
|
||||
if *CAP_DISPLAY_INFO.read().unwrap() == 0 {
|
||||
@@ -133,7 +136,7 @@ fn get_max_desktop_resolution() -> Option<String> {
|
||||
}
|
||||
|
||||
pub(super) async fn check_init() -> ResultType<()> {
|
||||
if !scrap::is_x11() {
|
||||
if !is_x11() {
|
||||
let mut minx = 0;
|
||||
let mut maxx = 0;
|
||||
let mut miny = 0;
|
||||
@@ -246,7 +249,7 @@ pub(super) fn get_primary() -> ResultType<usize> {
|
||||
}
|
||||
|
||||
pub fn clear() {
|
||||
if scrap::is_x11() {
|
||||
if is_x11() {
|
||||
return;
|
||||
}
|
||||
let mut write_lock = CAP_DISPLAY_INFO.write().unwrap();
|
||||
@@ -261,7 +264,7 @@ pub fn clear() {
|
||||
}
|
||||
|
||||
pub(super) fn get_capturer() -> ResultType<super::video_service::CapturerInfo> {
|
||||
if scrap::is_x11() {
|
||||
if is_x11() {
|
||||
bail!("Do not call this function if not wayland");
|
||||
}
|
||||
let addr = *CAP_DISPLAY_INFO.read().unwrap();
|
||||
|
||||
Reference in New Issue
Block a user