summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDeron <dj@dj-laptop.(none)>2007-06-04 20:15:29 -0700
committerDeron <dj@dj-laptop.(none)>2007-06-04 20:15:29 -0700
commitfb62fe4b58f7c0af67853181dc68f2acec510290 (patch)
treec2bdebfd2149a9e46e7984e5722aeb33d8de1e0c
parentfe201a8f9a4cd8390a84660f68b78d2e4de622dd (diff)
Modify existing files in branch.
-rw-r--r--hw/vfb/InitInput.c48
-rw-r--r--hw/vfb/InitOutput.c57
-rw-r--r--hw/vfb/Makefile.am9
-rw-r--r--hw/vfb/lk201kbd.h32
4 files changed, 146 insertions, 0 deletions
diff --git a/hw/vfb/InitInput.c b/hw/vfb/InitInput.c
index 773c45420..f8aa0f79d 100644
--- a/hw/vfb/InitInput.c
+++ b/hw/vfb/InitInput.c
@@ -24,6 +24,35 @@ not be used in advertising or otherwise to promote the sale, use or
other dealings in this Software without prior written authorization
from The Open Group.
+Copyright 2007 Sun Microsystems, Inc.
+
+All rights reserved.
+
+Permission is hereby granted, free of charge, to any person obtaining a
+copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, and/or sell copies of the Software, and to permit persons
+to whom the Software is furnished to do so, provided that the above
+copyright notice(s) and this permission notice appear in all copies of
+the Software and that both the above copyright notice(s) and this
+permission notice appear in supporting documentation.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
+OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
+HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
+INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
+FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
+NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
+WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+Except as contained in this notice, the name of a copyright holder
+shall not be used in advertising or otherwise to promote the sale, use
+or other dealings in this Software without prior written authorization
+of the copyright holder.
+
*/
#ifdef HAVE_DIX_CONFIG_H
@@ -41,6 +70,9 @@ from The Open Group.
#include "mipointer.h"
#include "lk201kbd.h"
#include <X11/keysym.h>
+#ifdef REMWIN
+#include "remwin.h"
+#endif /* REMWIN */
Bool
LegalModifier(unsigned int key, DevicePtr pDev)
@@ -83,6 +115,16 @@ GetLK201Mappings(KeySymsPtr pKeySyms, CARD8 *pModMap)
for (i = 0; i < (MAP_LENGTH * LK201_GLYPHS_PER_KEY); i++)
map[i] = NoSymbol; /* make sure it is restored */
+#ifdef REMWIN
+ if (vfbRemoteWindow) {
+ /*
+ ** Note: For some reason Backspace was missing from this keymap
+ ** (which was derived from vfb/InitInput.c).
+ */
+ map[INDEX(KEY_BACKSPACE)] = XK_BackSpace;
+ }
+#endif /* REMWIN */
+
map[INDEX(KEY_F1)] = XK_F1;
map[INDEX(KEY_F2)] = XK_F2;
map[INDEX(KEY_F3)] = XK_F3;
@@ -265,6 +307,12 @@ vfbKeybdProc(DeviceIntPtr pDevice, int onoff)
{
case DEVICE_INIT:
GetLK201Mappings(&keySyms, modMap);
+#ifdef REMWIN
+ if (vfbRemoteWindow) {
+ InitKeyboardDeviceStruct(pDev, &keySyms, modMap,
+ (BellProcPtr)rwoutBeep, (KbdCtrlProcPtr)NoopDDA);
+ } else
+#endif /* REMWIN */
InitKeyboardDeviceStruct(pDev, &keySyms, modMap,
(BellProcPtr)NoopDDA, (KbdCtrlProcPtr)NoopDDA);
break;
diff --git a/hw/vfb/InitOutput.c b/hw/vfb/InitOutput.c
index a2d866118..f0613c0d0 100644
--- a/hw/vfb/InitOutput.c
+++ b/hw/vfb/InitOutput.c
@@ -24,6 +24,35 @@ not be used in advertising or otherwise to promote the sale, use or
other dealings in this Software without prior written authorization
from The Open Group.
+Copyright 2007 Sun Microsystems, Inc.
+
+All rights reserved.
+
+Permission is hereby granted, free of charge, to any person obtaining a
+copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, and/or sell copies of the Software, and to permit persons
+to whom the Software is furnished to do so, provided that the above
+copyright notice(s) and this permission notice appear in all copies of
+the Software and that both the above copyright notice(s) and this
+permission notice appear in supporting documentation.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
+OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
+HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
+INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
+FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
+NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
+WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+Except as contained in this notice, the name of a copyright holder
+shall not be used in advertising or otherwise to promote the sale, use
+or other dealings in this Software without prior written authorization
+of the copyright holder.
+
*/
#ifdef HAVE_DIX_CONFIG_H
@@ -67,6 +96,9 @@ from The Open Group.
#endif /* HAS_SHM */
#include "dix.h"
#include "miline.h"
+#ifdef REMWIN
+#include "remwin.h"
+#endif /* REMWIN */
#define VFB_DEFAULT_WIDTH 1280
#define VFB_DEFAULT_HEIGHT 1024
@@ -105,6 +137,10 @@ typedef struct
#endif
} vfbScreenInfo, *vfbScreenInfoPtr;
+#ifdef REMWIN
+Bool vfbRemoteWindow = FALSE;
+#endif /* REMWIN */
+
static int vfbNumScreens;
static vfbScreenInfo vfbScreens[MAXSCREENS];
static Bool vfbPixmapDepths[33];
@@ -280,6 +316,10 @@ ddxUseMsg()
#ifdef HAS_SHM
ErrorF("-shmem put framebuffers in shared memory\n");
#endif
+
+#ifdef REMWIN
+ ErrorF("-remwin run as an X Remote Window protocol server\n");
+#endif /* REMWIN */
}
/* ddxInitGlobals - called by |InitGlobals| from os/util.c */
@@ -448,6 +488,15 @@ ddxProcessArgument(int argc, char *argv[], int i)
}
#endif
+#ifdef REMWIN
+ /* Activate the Remote Window functionality */
+ if (strcmp (argv[i], "-remwin") == 0) { /* -remwin */
+ vfbRemoteWindow = TRUE;
+ ErrorF("XRemote Window is enabled\n");
+ return 1;
+ }
+#endif /* REMWIN */
+
return 0;
}
@@ -977,6 +1026,14 @@ vfbScreenInit(int index, ScreenPtr pScreen, int argc, char **argv)
pvfb->closeScreen = pScreen->CloseScreen;
pScreen->CloseScreen = vfbCloseScreen;
+#ifdef REMWIN
+ if (vfbRemoteWindow) {
+ if (!rwoutInitScreen(pScreen)) {
+ FatalError("Could not initialize remote window server");
+ }
+ }
+#endif /* REMWIN */
+
return ret;
} /* end vfbScreenInit */
diff --git a/hw/vfb/Makefile.am b/hw/vfb/Makefile.am
index ca113c9a8..785906a21 100644
--- a/hw/vfb/Makefile.am
+++ b/hw/vfb/Makefile.am
@@ -2,7 +2,15 @@ bin_PROGRAMS = Xvfb
SRCS = InitInput.c \
InitOutput.c \
+ rwcommsock.c \
+ rwin.c \
+ rwout.c \
+ takecontrol.c \
lk201kbd.h \
+ remwin.h \
+ rle.c \
+ rwcomm.h \
+ rwcommsock.h \
$(top_srcdir)/Xext/dpmsstubs.c \
$(top_srcdir)/Xi/stubs.c \
$(top_srcdir)/mi/miinitext.c \
@@ -22,6 +30,7 @@ AM_CFLAGS = -DHAVE_DIX_CONFIG_H \
-DNO_HW_ONLY_EXTS \
-DNO_MODULE_EXTS \
-DXFree86Server \
+ -DREMWIN \
$(XVFBMODULES_CFLAGS)
# Man page
diff --git a/hw/vfb/lk201kbd.h b/hw/vfb/lk201kbd.h
index d0198d06b..91acc4e1b 100644
--- a/hw/vfb/lk201kbd.h
+++ b/hw/vfb/lk201kbd.h
@@ -43,6 +43,35 @@ WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
SOFTWARE.
+Copyright 2007 Sun Microsystems, Inc.
+
+All rights reserved.
+
+Permission is hereby granted, free of charge, to any person obtaining a
+copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, and/or sell copies of the Software, and to permit persons
+to whom the Software is furnished to do so, provided that the above
+copyright notice(s) and this permission notice appear in all copies of
+the Software and that both the above copyright notice(s) and this
+permission notice appear in supporting documentation.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
+OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
+HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
+INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
+FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
+NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
+WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+Except as contained in this notice, the name of a copyright holder
+shall not be used in advertising or otherwise to promote the sale, use
+or other dealings in this Software without prior written authorization
+of the copyright holder.
+
******************************************************************/
@@ -50,6 +79,9 @@ SOFTWARE.
#define MAX_LK201_KEY 251
#define LK201_GLYPHS_PER_KEY 2
+#ifdef REMWIN
+#define KEY_BACKSPACE 22
+#endif /* REMWIN */
#define KEY_F1 86
#define KEY_F2 87
#define KEY_F3 88