Fix animated cursor resize crash

This commit is contained in:
Lauri Kasanen
2021-06-15 15:39:48 +03:00
parent 9144045718
commit 29e0e2bd2e
6 changed files with 19 additions and 7 deletions

View File

@@ -74,7 +74,7 @@ XserverDesktop::XserverDesktop(int screenIndex_,
: screenIndex(screenIndex_),
server(0), listeners(listeners_),
directFbptr(true),
queryConnectId(0), queryConnectTimer(this)
queryConnectId(0), queryConnectTimer(this), resizing(false)
{
format = pf;
@@ -251,7 +251,7 @@ void XserverDesktop::setCursor(int width, int height, int hotX, int hotY,
}
try {
server->setCursor(width, height, Point(hotX, hotY), cursorData);
server->setCursor(width, height, Point(hotX, hotY), cursorData, resizing);
} catch (rdr::Exception& e) {
vlog.error("XserverDesktop::setCursor: %s",e.str());
}
@@ -462,8 +462,11 @@ unsigned int XserverDesktop::setScreenLayout(int fb_width, int fb_height,
layout.print(buffer, sizeof(buffer));
vlog.debug("%s", buffer);
resizing = true;
vncSetGlueContext(screenIndex);
return ::setScreenLayout(fb_width, fb_height, layout, &outputIdMap);
const unsigned int ret = ::setScreenLayout(fb_width, fb_height, layout, &outputIdMap);
resizing = false;
return ret;
}
void XserverDesktop::handleClipboardRequest()

View File

@@ -132,5 +132,7 @@ private:
OutputIdMap outputIdMap;
rfb::Point oldCursorPos;
bool resizing;
};
#endif