Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions crates/ironrdp-client/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -415,9 +415,9 @@ impl Config {
},
hardware_id: None,
license_cache: None,
no_server_pointer: args.no_server_pointer,
enable_server_pointer: !args.no_server_pointer,
autologon: args.autologon,
no_audio_playback: false,
enable_audio_playback: true,
request_data: None,
pointer_software_rendering: false,
performance_flags: PerformanceFlags::default(),
Expand Down
6 changes: 3 additions & 3 deletions crates/ironrdp-client/src/rdp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -613,7 +613,7 @@ async fn active_session(
io_channel_id,
user_channel_id,
desktop_size,
no_server_pointer,
enable_server_pointer,
pointer_software_rendering,
} = connection_activation.state
{
Expand All @@ -625,12 +625,12 @@ async fn active_session(
fast_path::ProcessorBuilder {
io_channel_id,
user_channel_id,
no_server_pointer,
enable_server_pointer,
pointer_software_rendering,
}
.build(),
);
active_stage.set_no_server_pointer(no_server_pointer);
active_stage.set_enable_server_pointer(enable_server_pointer);
break 'activation_seq;
}
}
Expand Down
8 changes: 4 additions & 4 deletions crates/ironrdp-connector/src/connection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ pub struct ConnectionResult {
pub user_channel_id: u16,
pub static_channels: StaticChannelSet,
pub desktop_size: DesktopSize,
pub no_server_pointer: bool,
pub enable_server_pointer: bool,
pub pointer_software_rendering: bool,
pub connection_activation: ConnectionActivationSequence,
}
Expand Down Expand Up @@ -550,15 +550,15 @@ impl Sequence for ClientConnector {
io_channel_id,
user_channel_id,
desktop_size,
no_server_pointer,
enable_server_pointer,
pointer_software_rendering,
} => ClientConnectorState::Connected {
result: ConnectionResult {
io_channel_id,
user_channel_id,
static_channels: mem::take(&mut self.static_channels),
desktop_size,
no_server_pointer,
enable_server_pointer,
pointer_software_rendering,
connection_activation,
},
Expand Down Expand Up @@ -725,7 +725,7 @@ fn create_client_info_pdu(config: &Config, client_addr: &SocketAddr) -> rdp::Cli
flags |= ClientInfoFlags::PASSWORD_IS_SC_PIN;
}

if config.no_audio_playback {
if !config.enable_audio_playback {
flags |= ClientInfoFlags::NO_AUDIO_PLAYBACK;
}

Expand Down
4 changes: 2 additions & 2 deletions crates/ironrdp-connector/src/connection_activation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ impl Sequence for ConnectionActivationSequence {
io_channel_id,
user_channel_id,
desktop_size,
no_server_pointer: self.config.no_server_pointer,
enable_server_pointer: self.config.enable_server_pointer,
pointer_software_rendering: self.config.pointer_software_rendering,
}
};
Expand Down Expand Up @@ -230,7 +230,7 @@ pub enum ConnectionActivationState {
io_channel_id: u16,
user_channel_id: u16,
desktop_size: DesktopSize,
no_server_pointer: bool,
enable_server_pointer: bool,
pointer_software_rendering: bool,
},
}
Expand Down
6 changes: 3 additions & 3 deletions crates/ironrdp-connector/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -179,14 +179,14 @@ pub struct Config {
/// If true, the INFO_AUTOLOGON flag is set in the [`ClientInfoPdu`](ironrdp_pdu::rdp::ClientInfoPdu)
pub autologon: bool,
/// If true, the INFO_NOAUDIOPLAYBACK flag is set in the [`ClientInfoPdu`](ironrdp_pdu::rdp::ClientInfoPdu)
pub no_audio_playback: bool,
pub enable_audio_playback: bool,
pub performance_flags: PerformanceFlags,

pub license_cache: Option<Arc<dyn LicenseCache>>,

// FIXME(@CBenoit): these are client-only options, not part of the connector.
pub no_server_pointer: bool,
pub enable_server_pointer: bool,
pub pointer_software_rendering: bool,
pub performance_flags: PerformanceFlags,
}

ironrdp_core::assert_impl!(Config: Send, Sync);
Expand Down
12 changes: 6 additions & 6 deletions crates/ironrdp-session/src/active_stage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ use crate::{fast_path, x224, SessionError, SessionErrorExt as _, SessionResult};
pub struct ActiveStage {
x224_processor: x224::Processor,
fast_path_processor: fast_path::Processor,
no_server_pointer: bool,
enable_server_pointer: bool,
}

impl ActiveStage {
Expand All @@ -34,15 +34,15 @@ impl ActiveStage {
let fast_path_processor = fast_path::ProcessorBuilder {
io_channel_id: connection_result.io_channel_id,
user_channel_id: connection_result.user_channel_id,
no_server_pointer: connection_result.no_server_pointer,
enable_server_pointer: connection_result.enable_server_pointer,
pointer_software_rendering: connection_result.pointer_software_rendering,
}
.build();

Self {
x224_processor,
fast_path_processor,
no_server_pointer: connection_result.no_server_pointer,
enable_server_pointer: connection_result.enable_server_pointer,
}
}

Expand Down Expand Up @@ -72,7 +72,7 @@ impl ActiveStage {
output.push(ActiveStageOutput::ResponseFrame(frame));

// If pointer rendering is disabled - we can skip the rest
if self.no_server_pointer {
if !self.enable_server_pointer {
return Ok(output);
}

Expand Down Expand Up @@ -152,8 +152,8 @@ impl ActiveStage {
self.fast_path_processor = processor;
}

pub fn set_no_server_pointer(&mut self, no_server_pointer: bool) {
self.no_server_pointer = no_server_pointer;
pub fn set_enable_server_pointer(&mut self, enable_server_pointer: bool) {
self.enable_server_pointer = enable_server_pointer;
}

/// Encodes client-side graceful shutdown request. Note that upon sending this request,
Expand Down
8 changes: 4 additions & 4 deletions crates/ironrdp-session/src/fast_path.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ pub struct Processor {
pointer_cache: PointerCache,
use_system_pointer: bool,
mouse_pos_update: Option<(u16, u16)>,
no_server_pointer: bool,
enable_server_pointer: bool,
pointer_software_rendering: bool,
#[cfg(feature = "qoiz")]
zdctx: zstd_safe::DCtx<'static>,
Expand Down Expand Up @@ -176,7 +176,7 @@ impl Processor {
processor_updates.push(update_kind);
}
Ok(FastPathUpdate::Pointer(update)) => {
if self.no_server_pointer {
if !self.enable_server_pointer {
return Ok(processor_updates);
}

Expand Down Expand Up @@ -442,7 +442,7 @@ pub struct ProcessorBuilder {
pub io_channel_id: u16,
pub user_channel_id: u16,
/// Ignore server pointer updates.
pub no_server_pointer: bool,
pub enable_server_pointer: bool,
/// Use software rendering mode for pointer bitmap generation. When this option is active,
/// `UpdateKind::PointerBitmap` will not be generated. Remote pointer will be drawn
/// via software rendering on top of the output image.
Expand All @@ -459,7 +459,7 @@ impl ProcessorBuilder {
pointer_cache: PointerCache::default(),
use_system_pointer: true,
mouse_pos_update: None,
no_server_pointer: self.no_server_pointer,
enable_server_pointer: self.enable_server_pointer,
pointer_software_rendering: self.pointer_software_rendering,
#[cfg(feature = "qoiz")]
zdctx: zstd_safe::DCtx::default(),
Expand Down
10 changes: 5 additions & 5 deletions crates/ironrdp-testsuite-extra/tests/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ async fn test_deactivation_reactivation() {
io_channel_id,
user_channel_id,
desktop_size,
no_server_pointer,
enable_server_pointer,
pointer_software_rendering,
} = connection_activation.state
{
Expand All @@ -96,12 +96,12 @@ async fn test_deactivation_reactivation() {
session::fast_path::ProcessorBuilder {
io_channel_id,
user_channel_id,
no_server_pointer,
enable_server_pointer,
pointer_software_rendering,
}
.build(),
);
stage.set_no_server_pointer(no_server_pointer);
stage.set_enable_server_pointer(enable_server_pointer);
break 'activation_seq;
}
}
Expand Down Expand Up @@ -297,9 +297,9 @@ fn default_client_config() -> connector::Config {
hardware_id: None,
request_data: None,
autologon: false,
no_audio_playback: false,
enable_audio_playback: true,
license_cache: None,
no_server_pointer: true,
enable_server_pointer: true,
pointer_software_rendering: true,
performance_flags: Default::default(),
}
Expand Down
10 changes: 5 additions & 5 deletions crates/ironrdp-web/src/session.rs
Original file line number Diff line number Diff line change
Expand Up @@ -726,7 +726,7 @@ impl iron_remote_desktop::Session for Session {
io_channel_id,
user_channel_id,
desktop_size,
no_server_pointer,
enable_server_pointer,
pointer_software_rendering,
} = box_connection_activation.state
{
Expand All @@ -738,12 +738,12 @@ impl iron_remote_desktop::Session for Session {
fast_path::ProcessorBuilder {
io_channel_id,
user_channel_id,
no_server_pointer,
enable_server_pointer,
pointer_software_rendering,
}
.build(),
);
active_stage.set_no_server_pointer(no_server_pointer);
active_stage.set_enable_server_pointer(enable_server_pointer);
break 'activation_seq;
}
}
Expand Down Expand Up @@ -887,9 +887,9 @@ fn build_config(
// https://github.com/FreeRDP/FreeRDP/blob/4e24b966c86fdf494a782f0dfcfc43a057a2ea60/libfreerdp/core/settings.c#LL49C34-L49C70
client_dir: "C:\\Windows\\System32\\mstscax.dll".to_owned(),
platform: ironrdp::pdu::rdp::capability_sets::MajorPlatformType::UNSPECIFIED,
no_server_pointer: false,
enable_server_pointer: false,
autologon: false,
no_audio_playback: true,
enable_audio_playback: false,
request_data: None,
pointer_software_rendering: false,
performance_flags: PerformanceFlags::default(),
Expand Down
5 changes: 2 additions & 3 deletions crates/ironrdp/examples/screenshot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -205,11 +205,10 @@ fn build_config(username: String, password: String, domain: Option<String>) -> c
#[cfg(target_os = "netbsd")]
platform: MajorPlatformType::UNIX,

// Disable custom pointers (there is no user interaction anyway)
no_server_pointer: true,
enable_server_pointer: false, // Disable custom pointers (there is no user interaction anyway).
request_data: None,
autologon: false,
no_audio_playback: true,
enable_audio_playback: false,
pointer_software_rendering: true,
performance_flags: PerformanceFlags::default(),
desktop_scale_factor: 0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@ private async Task<bool> HandleActiveStageOutput(ActiveStageOutputIterator outpu
var desktopSize = finalized.GetDesktopSize();
var ioChannelId = finalized.GetIoChannelId();
var userChannelId = finalized.GetUserChannelId();
var noServerPointer = finalized.GetNoServerPointer();
var enableServerPointer = finalized.GetEnableServerPointer();
var pointerSoftwareRendering = finalized.GetPointerSoftwareRendering();

_decodedImage = DecodedImage.New(PixelFormat.RgbA32, desktopSize.GetWidth(),
Expand All @@ -436,11 +436,11 @@ private async Task<bool> HandleActiveStageOutput(ActiveStageOutputIterator outpu
_activeStage!.SetFastpathProcessor(
ioChannelId,
userChannelId,
noServerPointer,
enableServerPointer,
pointerSoftwareRendering
);

_activeStage.SetNoServerPointer(noServerPointer);
_activeStage.SetEnableServerPointer(enableServerPointer);

break;
}
Expand Down
12 changes: 6 additions & 6 deletions ffi/dotnet/Devolutions.IronRdp/Generated/ActiveStage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ public partial class ActiveStage: IDisposable
{
private unsafe Raw.ActiveStage* _inner;

public bool NoServerPointer
public bool EnableServerPointer
{
set
{
SetNoServerPointer(value);
SetEnableServerPointer(value);
}
}

Expand Down Expand Up @@ -265,27 +265,27 @@ public ActiveStageOutputIterator EncodedResize(uint width, uint height)
}
}

public void SetFastpathProcessor(ushort ioChannelId, ushort userChannelId, bool noServerPointer, bool pointerSoftwareRendering)
public void SetFastpathProcessor(ushort ioChannelId, ushort userChannelId, bool enableServerPointer, bool pointerSoftwareRendering)
{
unsafe
{
if (_inner == null)
{
throw new ObjectDisposedException("ActiveStage");
}
Raw.ActiveStage.SetFastpathProcessor(_inner, ioChannelId, userChannelId, noServerPointer, pointerSoftwareRendering);
Raw.ActiveStage.SetFastpathProcessor(_inner, ioChannelId, userChannelId, enableServerPointer, pointerSoftwareRendering);
}
}

public void SetNoServerPointer(bool noServerPointer)
public void SetEnableServerPointer(bool enableServerPointer)
{
unsafe
{
if (_inner == null)
{
throw new ObjectDisposedException("ActiveStage");
}
Raw.ActiveStage.SetNoServerPointer(_inner, noServerPointer);
Raw.ActiveStage.SetEnableServerPointer(_inner, enableServerPointer);
}
}

Expand Down
20 changes: 10 additions & 10 deletions ffi/dotnet/Devolutions.IronRdp/Generated/ConfigBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,14 @@ public bool EnableCredssp
}
}

public bool EnableServerPointer
{
set
{
SetEnableServerPointer(value);
}
}

public bool EnableTls
{
set
Expand Down Expand Up @@ -127,14 +135,6 @@ public KeyboardType KeyboardType
}
}

public bool NoServerPointer
{
set
{
SetNoServerPointer(value);
}
}

public PerformanceFlags PerformanceFlags
{
set
Expand Down Expand Up @@ -418,15 +418,15 @@ public void SetClientDir(string clientDir)
}
}

public void SetNoServerPointer(bool noServerPointer)
public void SetEnableServerPointer(bool enableServerPointer)
{
unsafe
{
if (_inner == null)
{
throw new ObjectDisposedException("ConfigBuilder");
}
Raw.ConfigBuilder.SetNoServerPointer(_inner, noServerPointer);
Raw.ConfigBuilder.SetEnableServerPointer(_inner, enableServerPointer);
}
}

Expand Down
Loading
Loading