KASM-3119 send full frame on permission changes

This commit is contained in:
mattmcclaskey
2022-09-06 17:48:44 +00:00
parent 924329900d
commit 1e4ca3563c
8 changed files with 52 additions and 10 deletions

View File

@@ -49,6 +49,8 @@
extern "C" {
void vncSetGlueContext(int screenIndex);
extern int wakeuppipe[2];
}
using namespace rfb;
@@ -307,6 +309,13 @@ void XserverDesktop::handleSocketEvent(int fd, bool read, bool write)
{
try {
if (read) {
if (fd == wakeuppipe[0]) {
unsigned char buf;
while (::read(fd, &buf, 1) > 0);
server->refreshClients();
return;
}
if (handleListenerEvent(fd, &listeners, server))
return;
}

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;
}