Add /api/send_full_frame

This commit is contained in:
Lauri Kasanen
2022-06-23 18:53:27 +03:00
parent 61f08d4986
commit 8b71ea3cd9
5 changed files with 47 additions and 0 deletions

View File

@@ -17,8 +17,10 @@
* USA.
*/
#include <fcntl.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <errno.h>
#include <set>
@@ -49,6 +51,8 @@
extern "C" {
void vncSetGlueContext(int screenIndex);
int wakeuppipe[2];
}
using namespace rfb;
@@ -225,6 +229,11 @@ void vncExtensionInit(void)
dummyY < 16)
vncFatalError("Invalid value to %s", Server::maxVideoResolution.getName());
pipe(wakeuppipe);
const int flags = fcntl(wakeuppipe[0], F_GETFL, 0);
fcntl(wakeuppipe[0], F_SETFL, flags | O_NONBLOCK);
vncSetNotifyFd(wakeuppipe[0], 0, true, false);
initialised = true;
}