mirror of
https://github.com/weyne85/rustdesk.git
synced 2025-10-29 17:00:05 +00:00
fix: win remote and file transfer , simultaneous connection
Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
@@ -725,7 +725,7 @@ fn legacy_keyboard_mode(evt: &KeyEvent) {
|
||||
// disable numlock if press home etc when numlock is on,
|
||||
// because we will get numpad value (7,8,9 etc) if not
|
||||
#[cfg(windows)]
|
||||
let mut disable_numlock = false;
|
||||
let mut _disable_numlock = false;
|
||||
#[cfg(target_os = "macos")]
|
||||
en.reset_flag();
|
||||
// When long-pressed the command key, then press and release
|
||||
@@ -775,8 +775,8 @@ fn legacy_keyboard_mode(evt: &KeyEvent) {
|
||||
if let Some(key) = KEY_MAP.get(&ck.value()) {
|
||||
#[cfg(windows)]
|
||||
if let Some(_) = NUMPAD_KEY_MAP.get(&ck.value()) {
|
||||
disable_numlock = en.get_key_state(Key::NumLock);
|
||||
if disable_numlock {
|
||||
_disable_numlock = en.get_key_state(Key::NumLock);
|
||||
if _disable_numlock {
|
||||
en.key_down(Key::NumLock).ok();
|
||||
en.key_up(Key::NumLock);
|
||||
}
|
||||
|
||||
@@ -468,6 +468,7 @@ fn run(sp: GenericService) -> ResultType<()> {
|
||||
#[cfg(windows)]
|
||||
start_uac_elevation_check();
|
||||
|
||||
#[cfg(target_os = "linux")]
|
||||
let mut would_block_count = 0u32;
|
||||
|
||||
while sp.ok() {
|
||||
@@ -570,9 +571,9 @@ fn run(sp: GenericService) -> ResultType<()> {
|
||||
try_gdi += 1;
|
||||
}
|
||||
|
||||
would_block_count += 1;
|
||||
#[cfg(target_os = "linux")]
|
||||
{
|
||||
would_block_count += 1;
|
||||
if !scrap::is_x11() {
|
||||
if would_block_count >= 100 {
|
||||
// For now, the user should choose and agree screen sharing agiain.
|
||||
@@ -600,7 +601,10 @@ fn run(sp: GenericService) -> ResultType<()> {
|
||||
return Err(err.into());
|
||||
}
|
||||
_ => {
|
||||
would_block_count = 0;
|
||||
#[cfg(target_os = "linux")]
|
||||
{
|
||||
would_block_count = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user