Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/neutrinolabs/ulalaca-xrdp.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGyuhwan Park★ <unstabler@unstabler.pl>2022-05-28 10:59:37 +0300
committerGyuhwan Park★ <unstabler@unstabler.pl>2022-05-28 10:59:37 +0300
commitd3d534f7532b02db2d0ab20082cf1f9fa53c7dee (patch)
treebc1d3d64b0f1dd846936539674e869569fadd54f
parentc5d507595f4b3467a1c1a4fec21737838e0d4121 (diff)
fix: call server_reset when session size != actual display size
-rw-r--r--ulalaca.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/ulalaca.cpp b/ulalaca.cpp
index d80ab3c..d9800ed 100644
--- a/ulalaca.cpp
+++ b/ulalaca.cpp
@@ -308,9 +308,13 @@ void XrdpUlalaca::addDirtyRect(Rect &rect) {
}
void XrdpUlalaca::commitUpdate(const uint8_t *image, int32_t width, int32_t height) {
- LOG(LOG_LEVEL_TRACE, "painting: %d, %d", width, height);
-
+ LOG(LOG_LEVEL_TRACE, "commiting screen update: %d, %d", width, height);
+
std::scoped_lock<std::mutex> scopedCommitLock(_commitUpdateLock);
+
+ if (_sessionSize.width != width || _sessionSize.height != height) {
+ server_reset(this, width, height, _bpp);
+ }
if ((_frameId - _ackFrameId) > 4) {
_dirtyRects.clear();
@@ -322,7 +326,7 @@ void XrdpUlalaca::commitUpdate(const uint8_t *image, int32_t width, int32_t heig
}
server_begin_update(this);
-
+
Rect screenRect = {0, 0, (short) width, (short) height};
auto copyRectSize = decideCopyRectSize();