Starting Xvnc without having any VNC functionality is pretty much pointless. So terminate when that happens, making the situation easier to detect for startup scripts.tags/v1.5.90
@@ -205,6 +205,11 @@ void vncExtensionInit(void) | |||
vncRegisterBlockHandlers(); | |||
} | |||
int vncExtensionIsActive(int scrIdx) | |||
{ | |||
return (desktop[scrIdx] != NULL); | |||
} | |||
void vncCallReadBlockHandlers(fd_set * fds, struct timeval ** timeout) | |||
{ | |||
for (int scr = 0; scr < vncGetScreenCount(); scr++) |
@@ -50,6 +50,7 @@ extern int vncFbstride[]; | |||
extern int vncInetdSock; | |||
void vncExtensionInit(void); | |||
int vncExtensionIsActive(int scrIdx); | |||
void vncCallReadBlockHandlers(fd_set * fds, struct timeval ** timeout); | |||
void vncCallReadWakeupHandlers(fd_set * fds, int nfds); |
@@ -1744,6 +1744,11 @@ void ProcessInputEvents(void) | |||
void InitInput(int argc, char *argv[]) | |||
{ | |||
int i; | |||
for (i = 0;i < screenInfo.numScreens;i++) { | |||
if (!vncExtensionIsActive(i)) | |||
FatalError("failed to activate VNC extension for one or more screens"); | |||
} | |||
mieqInit (); | |||
} | |||