mirror of
https://github.com/kasmtech/KasmVNC.git
synced 2026-07-17 16:36:49 +00:00
VNC-155 Add scrolling configuration keys
encoding.scrolling.detect_vertical_scrolling encoding.scrolling.detect_horizontal_scrolling encoding.scrolling.scroll_detect_threshold
This commit is contained in:
parent
0924817a76
commit
14ef7178b2
2 changed files with 54 additions and 0 deletions
|
|
@ -134,6 +134,10 @@ encoding:
|
|||
compare_framebuffer: auto
|
||||
zrle_zlib_level: auto
|
||||
hextile_improved_compression: true
|
||||
scrolling:
|
||||
detect_vertical_scrolling: false
|
||||
detect_horizontal_scrolling: false
|
||||
scroll_detect_threshold: 25%
|
||||
|
||||
server:
|
||||
http:
|
||||
|
|
|
|||
|
|
@ -2464,6 +2464,56 @@ sub DefineConfigToCLIConversion {
|
|||
})
|
||||
]
|
||||
}),
|
||||
KasmVNC::CliOption->new({
|
||||
name => 'DetectScrolling',
|
||||
configKeys => [
|
||||
KasmVNC::ConfigKey->new({
|
||||
name => "encoding.scrolling.detect_vertical_scrolling",
|
||||
type => KasmVNC::ConfigKey::BOOLEAN
|
||||
})
|
||||
],
|
||||
isActiveSub => sub {
|
||||
$self = shift;
|
||||
|
||||
my $value = $self->configValue();
|
||||
isPresent($value) && $value eq 'true';
|
||||
}
|
||||
}),
|
||||
KasmVNC::CliOption->new({
|
||||
name => 'DetectHorizontal',
|
||||
configKeys => [
|
||||
KasmVNC::ConfigKey->new({
|
||||
name => "encoding.scrolling.detect_horizontal_scrolling",
|
||||
type => KasmVNC::ConfigKey::BOOLEAN,
|
||||
validator => KasmVNC::CallbackValidator->new({
|
||||
isValidCallback => sub {
|
||||
my $value = shift;
|
||||
|
||||
return 1 if $value eq "false";
|
||||
|
||||
ConfigValue("encoding.scrolling.detect_vertical_scrolling") eq "true";
|
||||
},
|
||||
errorMessage => "Detection of horizontal scrolling requires detection of vertical scrolling enabled"
|
||||
}),
|
||||
})
|
||||
],
|
||||
isActiveSub => sub {
|
||||
$self = shift;
|
||||
|
||||
my $value = $self->configValue();
|
||||
isPresent($value) && $value eq 'true';
|
||||
}
|
||||
}),
|
||||
KasmVNC::CliOption->new({
|
||||
name => 'ScrollDetectLimit',
|
||||
configKeys => [
|
||||
KasmVNC::ConfigKey->new({
|
||||
name => "encoding.scrolling.scroll_detect_threshold",
|
||||
validator => $percentValidator
|
||||
})
|
||||
],
|
||||
deriveValueSub => $deriveValueStripPercentSub
|
||||
}),
|
||||
);
|
||||
|
||||
%cliArgMap = map { ("-" . $_->{name}) => $_ } @xvncOptions;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue