diff options
author | dscho <dscho> | 2001-12-21 15:27:10 +0000 |
---|---|---|
committer | dscho <dscho> | 2001-12-21 15:27:10 +0000 |
commit | 1d514588737cc744b74848464343cfa2056866ae (patch) | |
tree | 7bd5c653c93efd3c34a15f63e222c311898d2c4a /mac.c | |
parent | cddeb0d9d261d0a7f6e987c69d6123f5aedeebbe (diff) | |
download | libtdevnc-1d514588737cc744b74848464343cfa2056866ae.tar.gz libtdevnc-1d514588737cc744b74848464343cfa2056866ae.zip |
shared mode added
Diffstat (limited to 'mac.c')
-rw-r--r-- | mac.c | 17 |
1 files changed, 15 insertions, 2 deletions
@@ -266,6 +266,8 @@ PtrAddEvent(buttonMask, x, y, cl) (buttonMask & (1 << 7)) ? TRUE : FALSE); } +Bool viewOnly = FALSE, sharedMode = FALSE; + void ScreenInit(int argc, char**argv) { @@ -278,8 +280,15 @@ ScreenInit(int argc, char**argv) rfbScreen->paddedWidthInBytes = CGDisplayBytesPerRow(kCGDirectMainDisplay); rfbScreen->frameBuffer = (char *)CGDisplayBaseAddress(kCGDirectMainDisplay); - rfbScreen->ptrAddEvent = PtrAddEvent; - rfbScreen->kbdAddEvent = KbdAddEvent; + + if(!viewOnly) { + rfbScreen->ptrAddEvent = PtrAddEvent; + rfbScreen->kbdAddEvent = KbdAddEvent; + } + if(sharedMode) { + rfbScreen->rfbAlwaysShared = TRUE; + } + rfbInitServer(rfbScreen); } @@ -321,6 +330,10 @@ int main(int argc,char *argv[]) startTime = time(0); } else if(strcmp(argv[i],"-runforever")==0) { disconnectAfterFirstClient = FALSE; + } else if(strcmp(argv[i],"-viewonly")==0) { + viewOnly=TRUE; + } else if(strcmp(argv[i],"-shared")==0) { + sharedMode=TRUE; } ScreenInit(argc,argv); |