summaryrefslogtreecommitdiff
path: root/packages/xorg-xserver
diff options
context:
space:
mode:
authorPaul Sokolovsky <pmiscml@gmail.com>2007-09-08 10:40:24 +0000
committerPaul Sokolovsky <pmiscml@gmail.com>2007-09-08 10:40:24 +0000
commitdf40aba5426fc61c7e21ded4c317618368e37e3a (patch)
treeb0d042a7b0d160b10a6cf814d95d039879983dd9 /packages/xorg-xserver
parentcf46ec6805c85900b046a7b3a83bc1998827c8ca (diff)
parent111af15d78ea01b737d4b247ec4a2007beb00e6a (diff)
merge of '5de580abb15ee7230f7162ca138cac8c1c1dba23'
and 'c2df40f19e8788bf21437d463d250244cd5c8d4b'
Diffstat (limited to 'packages/xorg-xserver')
-rw-r--r--packages/xorg-xserver/xserver-kdrive-1.3.0.0/hide-cursor-and-ppm-root.patch307
-rw-r--r--packages/xorg-xserver/xserver-kdrive/w100-autofoo.patch54
-rw-r--r--packages/xorg-xserver/xserver-kdrive/w100.patch55
-rw-r--r--packages/xorg-xserver/xserver-kdrive_1.2.0.bb1
-rw-r--r--packages/xorg-xserver/xserver-kdrive_1.3.0.0.bb1
5 files changed, 57 insertions, 361 deletions
diff --git a/packages/xorg-xserver/xserver-kdrive-1.3.0.0/hide-cursor-and-ppm-root.patch b/packages/xorg-xserver/xserver-kdrive-1.3.0.0/hide-cursor-and-ppm-root.patch
deleted file mode 100644
index c160cd41dc..0000000000
--- a/packages/xorg-xserver/xserver-kdrive-1.3.0.0/hide-cursor-and-ppm-root.patch
+++ /dev/null
@@ -1,307 +0,0 @@
-diff -u -r xorg-server-X11R7.1-1.1.0.orig/dix/window.c xorg-server-X11R7.1-1.1.0/dix/window.c
---- xorg-server-X11R7.1-1.1.0.orig/dix/window.c 2007-01-08 14:30:38.000000000 +0000
-+++ xorg-server-X11R7.1-1.1.0/dix/window.c 2007-01-16 17:16:19.000000000 +0000
-@@ -185,6 +185,8 @@
- _X_EXPORT int numSaveUndersViewable = 0;
- _X_EXPORT int deltaSaveUndersViewable = 0;
-
-+char* RootPPM = NULL;
-+
- #ifdef DEBUG
- /******
- * PrintWindowTree
-@@ -311,6 +313,115 @@
- #endif
- }
-
-+static int
-+get_int(FILE *fp)
-+{
-+ int c = 0;
-+
-+ while ((c = getc(fp)) != EOF)
-+ {
-+ if (isspace(c))
-+ continue;
-+
-+ if (c == '#')
-+ while (c = getc(fp))
-+ if (c == EOF)
-+ return 0;
-+ else if (c == '\n')
-+ break;
-+
-+ if (isdigit(c))
-+ {
-+ int val = c - '0';
-+ while ((c = getc(fp)) && isdigit(c))
-+ val = (val * 10) + (c - '0');
-+ return val;
-+ }
-+ }
-+
-+ return 0;
-+}
-+
-+static unsigned char*
-+ppm_load (const char* path, int depth, int *width, int *height)
-+{
-+ FILE *fp;
-+ int max, n = 0, w, h, i, j, bytes_per_line;
-+ unsigned char *data, *res, h1, h2;
-+
-+ if (depth < 16 || depth > 32)
-+ return NULL;
-+
-+ if (depth > 16)
-+ depth = 32;
-+
-+ fp = fopen (path, "r");
-+ if (fp == NULL)
-+ return FALSE;
-+
-+ h1 = getc(fp);
-+ h2 = getc(fp);
-+
-+ /* magic is 'P6' for raw ppm */
-+ if (h1 != 'P' && h2 != '6')
-+ goto fail;
-+
-+ w = get_int(fp);
-+ h = get_int(fp);
-+
-+ if (w == 0 || h == 0)
-+ goto fail;
-+
-+ max = get_int(fp);
-+
-+ if (max != 255)
-+ goto fail;
-+
-+ bytes_per_line = ((w * depth + 31) >> 5) << 2;
-+
-+ res = data = malloc(bytes_per_line * h);
-+
-+ for (i=0; i<h; i++)
-+ {
-+ for (j=0; j<w; j++)
-+ {
-+ unsigned char buf[3];
-+ fread(buf, 1, 3, fp);
-+
-+ switch (depth)
-+ {
-+ case 24:
-+ case 32:
-+ *data = buf[2];
-+ *(data+1) = buf[1];
-+ *(data+2) = buf[0];
-+ data += 4;
-+ break;
-+ case 16:
-+ default:
-+ *(unsigned short*)data
-+ = ((buf[0] >> 3) << 11) | ((buf[1] >> 2) << 5) | (buf[2] >> 3);
-+ data += 2;
-+ break;
-+ }
-+ }
-+ data += (bytes_per_line - (w*(depth>>3)));
-+ }
-+
-+ data = res;
-+
-+ *width = w;
-+ *height = h;
-+
-+ fclose(fp);
-+
-+ return res;
-+
-+ fail:
-+ fclose(fp);
-+ return NULL;
-+}
-+
- static void
- MakeRootTile(WindowPtr pWin)
- {
-@@ -321,6 +432,36 @@
- register unsigned char *from, *to;
- register int i, j;
-
-+ if (RootPPM != NULL)
-+ {
-+ int w, h;
-+ unsigned char *data;
-+
-+ if ((data = ppm_load (RootPPM, pScreen->rootDepth, &w, &h)) != NULL)
-+ {
-+ pWin->background.pixmap
-+ = (*pScreen->CreatePixmap)(pScreen, w, h, pScreen->rootDepth);
-+
-+ pWin->backgroundState = BackgroundPixmap;
-+ pGC = GetScratchGC(pScreen->rootDepth, pScreen);
-+ if (!pWin->background.pixmap || !pGC)
-+ FatalError("could not create root tile");
-+
-+ ValidateGC((DrawablePtr)pWin->background.pixmap, pGC);
-+
-+ (*pGC->ops->PutImage)((DrawablePtr)pWin->background.pixmap,
-+ pGC,
-+ pScreen->rootDepth,
-+ 0, 0, w, h, 0, ZPixmap, (char *)data);
-+ FreeScratchGC(pGC);
-+
-+ free(data);
-+ return;
-+ }
-+ else
-+ ErrorF("Unable to load root window image.");
-+ }
-+
- pWin->background.pixmap = (*pScreen->CreatePixmap)(pScreen, 4, 4,
- pScreen->rootDepth);
-
-@@ -357,6 +498,7 @@
-
- }
-
-+
- WindowPtr
- AllocateWindow(ScreenPtr pScreen)
- {
-diff -u -r xorg-server-X11R7.1-1.1.0.orig/hw/kdrive/src/kdrive.c xorg-server-X11R7.1-1.1.0/hw/kdrive/src/kdrive.c
---- xorg-server-X11R7.1-1.1.0.orig/hw/kdrive/src/kdrive.c 2007-01-08 14:30:38.000000000 +0000
-+++ xorg-server-X11R7.1-1.1.0/hw/kdrive/src/kdrive.c 2007-01-15 17:53:06.000000000 +0000
-@@ -58,6 +58,9 @@
- { 32, 32 }
- };
-
-+int
-+ProcXFixesHideCursor (ClientPtr client) ;
-+
- #define NUM_KD_DEPTHS (sizeof (kdDepths) / sizeof (kdDepths[0]))
-
- int kdScreenPrivateIndex;
-@@ -84,6 +87,9 @@
- KdOsFuncs *kdOsFuncs;
- extern WindowPtr *WindowTable;
-
-+extern Bool CursorInitiallyHidden; /* See Xfixes cursor.c */
-+extern char* RootPPM; /* dix/window.c */
-+
- void
- KdSetRootClip (ScreenPtr pScreen, BOOL enable)
- {
-@@ -312,6 +318,7 @@
- KdSetRootClip (pScreen, TRUE);
- if (pScreenPriv->card->cfuncs->dpms)
- (*pScreenPriv->card->cfuncs->dpms) (pScreen, pScreenPriv->dpmsState);
-+
- return TRUE;
- }
-
-@@ -686,10 +693,14 @@
- ErrorF("-mouse path[,n] Filename of mouse device, n is number of buttons\n");
- ErrorF("-switchCmd Command to execute on vt switch\n");
- ErrorF("-nozap Don't terminate server on Ctrl+Alt+Backspace\n");
-+ ErrorF("-hide-cursor Start with cursor hidden\n");
-+ ErrorF("-root-ppm [path] Specify ppm file to use as root window background.\n");
- ErrorF("vtxx Use virtual terminal xx instead of the next available\n");
- #ifdef PSEUDO8
- p8UseMsg ();
- #endif
-+
-+
- }
-
- int
-@@ -761,6 +772,19 @@
- kdSoftCursor = TRUE;
- return 1;
- }
-+ if (!strcmp (argv[i], "-hide-cursor"))
-+ {
-+ CursorInitiallyHidden = TRUE;
-+ return 1;
-+ }
-+ if (!strcmp (argv[i], "-root-ppm"))
-+ {
-+ if ((i+1) < argc)
-+ RootPPM = argv[i+1];
-+ else
-+ UseMsg ();
-+ return 2;
-+ }
- if (!strcmp (argv[i], "-videoTest"))
- {
- kdVideoTest = TRUE;
-diff -u -r xorg-server-X11R7.1-1.1.0.orig/xfixes/cursor.c xorg-server-X11R7.1-1.1.0/xfixes/cursor.c
---- xorg-server-X11R7.1-1.1.0.orig/xfixes/cursor.c 2007-01-08 14:30:38.000000000 +0000
-+++ xorg-server-X11R7.1-1.1.0/xfixes/cursor.c 2007-01-11 16:33:00.000000000 +0000
-@@ -59,9 +59,12 @@
- static RESTYPE CursorWindowType;
- static int CursorScreenPrivateIndex = -1;
- static int CursorGeneration;
-+static Bool CursorGloballyHidden;
- static CursorPtr CursorCurrent;
- static CursorPtr pInvisibleCursor = NULL;
-
-+Bool CursorInitiallyHidden = FALSE;
-+
- static void deleteCursorHideCountsForScreen (ScreenPtr pScreen);
-
- #define VERIFY_CURSOR(pCursor, cursor, client, access) { \
-@@ -130,7 +133,7 @@
-
- Unwrap (cs, pScreen, DisplayCursor);
-
-- if (cs->pCursorHideCounts != NULL) {
-+ if (cs->pCursorHideCounts != NULL || CursorGloballyHidden) {
- ret = (*pScreen->DisplayCursor) (pScreen, pInvisibleCursor);
- } else {
- ret = (*pScreen->DisplayCursor) (pScreen, pCursor);
-@@ -848,6 +851,12 @@
- return BadWindow;
- }
-
-+ /* Is cursor set to be initially hidden ?, if so reset this
-+ * flag as now visibility assumed under control of client.
-+ */
-+ if (CursorGloballyHidden)
-+ CursorGloballyHidden = FALSE;
-+
- /*
- * Has client hidden the cursor before on this screen?
- * If so, just increment the count.
-@@ -899,9 +908,19 @@
- return BadWindow;
- }
-
-+ /* X was started with cursor hidden, therefore just reset our flag
-+ * (returning to normal client control) and cause cursor to now be
-+ * shown.
-+ */
-+ if (CursorGloballyHidden == TRUE)
-+ {
-+ CursorGloballyHidden = FALSE;
-+ return (client->noClientException);
-+ }
-+
- /*
- * Has client hidden the cursor on this screen?
-- * If not, generate an error.
-+ * If so, generate an error.
- */
- pChc = findCursorHideCount(client, pWin->drawable.pScreen);
- if (pChc == NULL) {
-@@ -1009,6 +1028,8 @@
- XFixesCursorInit (void)
- {
- int i;
-+
-+ CursorGloballyHidden = CursorInitiallyHidden;
-
- if (CursorGeneration != serverGeneration)
- {
diff --git a/packages/xorg-xserver/xserver-kdrive/w100-autofoo.patch b/packages/xorg-xserver/xserver-kdrive/w100-autofoo.patch
new file mode 100644
index 0000000000..b53e327dae
--- /dev/null
+++ b/packages/xorg-xserver/xserver-kdrive/w100-autofoo.patch
@@ -0,0 +1,54 @@
+Index: git/hw/kdrive/Makefile.am
+===================================================================
+--- git.orig/hw/kdrive/Makefile.am 2006-09-02 12:12:13.000000000 +0200
++++ git/hw/kdrive/Makefile.am 2006-09-02 12:12:14.000000000 +0200
+@@ -7,6 +7,10 @@
+ FBDEV_SUBDIRS = fbdev epson
+ endif
+
++if KDRIVEW100
++W100_SUBDIRS = w100
++endif
++
+ if XSDLSERVER
+ XSDL_SUBDIRS = sdl
+ endif
+@@ -20,6 +24,7 @@
+ linux \
+ $(XSDL_SUBDIRS) \
+ $(FBDEV_SUBDIRS) \
++ $(W100_SUBDIRS) \
+ $(VESA_SUBDIRS) \
+ $(XEPHYR_SUBDIRS) \
+ fake
+Index: git/configure.ac
+===================================================================
+--- git.orig/configure.ac 2006-09-02 12:12:14.000000000 +0200
++++ git/configure.ac 2006-09-02 12:12:14.000000000 +0200
+@@ -442,6 +442,7 @@
+ AC_ARG_ENABLE(kdrive, AS_HELP_STRING([--enable-kdrive], [Build kdrive servers (default: no)]), [KDRIVE=$enableval], [KDRIVE=no])
+ AC_ARG_ENABLE(xephyr, AS_HELP_STRING([--enable-xephyr], [Build the kdrive Xephyr server (default: auto)]), [XEPHYR=$enableval], [XEPHYR=auto])
+ AC_ARG_ENABLE(xsdl, AS_HELP_STRING([--enable-xsdl], [Build the kdrive Xsdl server (default: auto)]), [XSDL=$enableval], [XSDL=auto])
++AC_ARG_ENABLE(w100, AS_HELP_STRING([--enable-w100], [Build the kdrive Xw100 server (default: no)]), [KDRIVEW100=$enableval], [KDRIVEW100=no])
+ dnl xprint
+ AC_ARG_ENABLE(freetype, AS_HELP_STRING([ --enable-freetype], [Build Xprint FreeType backend (default: yes)]), [XP_USE_FREETYPE=$enableval],[XP_USE_FREETYPE=no])
+ AC_ARG_WITH(freetype-config, AS_HELP_STRING([ --with-freetype-config=PROG], [Use FreeType configuration program PROG (default: auto)]), freetype_config=$withval, freetype_config=auto)
+@@ -1519,6 +1520,10 @@
+ AC_SUBST([XSDL_LIBS])
+ AC_SUBST([XSDL_INCS])
+
++AM_CONDITIONAL(KDRIVEW100, [test "x$KDRIVEW100" = xyes])
++if test "x$KDRIVEW100" = xyes; then
++ AC_DEFINE(KDRIVEW100, 1, [Build Xw100 server])
++fi
+
+ dnl these only go in xkb-config.h (which is shared by the Xorg and Xnest servers)
+ AC_DEFINE(__XKBDEFRULES__, "xorg", [Default XKB rules])
+@@ -1753,6 +1758,7 @@
+ hw/kdrive/epson/Makefile
+ hw/kdrive/fake/Makefile
+ hw/kdrive/fbdev/Makefile
++hw/kdrive/w100/Makefile
+ hw/kdrive/i810/Makefile
+ hw/kdrive/linux/Makefile
+ hw/kdrive/mach64/Makefile
diff --git a/packages/xorg-xserver/xserver-kdrive/w100.patch b/packages/xorg-xserver/xserver-kdrive/w100.patch
index 9a20fa1f1e..1bb6f357c6 100644
--- a/packages/xorg-xserver/xserver-kdrive/w100.patch
+++ b/packages/xorg-xserver/xserver-kdrive/w100.patch
@@ -6332,57 +6332,4 @@ Index: git/hw/kdrive/w100/w100_regs.h
+
+
+#endif //_W100_REGS_H_
-Index: git/hw/kdrive/Makefile.am
-===================================================================
---- git.orig/hw/kdrive/Makefile.am 2006-09-02 12:12:13.000000000 +0200
-+++ git/hw/kdrive/Makefile.am 2006-09-02 12:12:14.000000000 +0200
-@@ -7,6 +7,10 @@
- FBDEV_SUBDIRS = fbdev epson
- endif
-
-+if KDRIVEW100
-+W100_SUBDIRS = w100
-+endif
-+
- if XSDLSERVER
- XSDL_SUBDIRS = sdl
- endif
-@@ -20,6 +24,7 @@
- linux \
- $(XSDL_SUBDIRS) \
- $(FBDEV_SUBDIRS) \
-+ $(W100_SUBDIRS) \
- $(VESA_SUBDIRS) \
- $(XEPHYR_SUBDIRS) \
- fake
-Index: git/configure.ac
-===================================================================
---- git.orig/configure.ac 2006-09-02 12:12:14.000000000 +0200
-+++ git/configure.ac 2006-09-02 12:12:14.000000000 +0200
-@@ -442,6 +442,7 @@
- AC_ARG_ENABLE(kdrive, AS_HELP_STRING([--enable-kdrive], [Build kdrive servers (default: no)]), [KDRIVE=$enableval], [KDRIVE=no])
- AC_ARG_ENABLE(xephyr, AS_HELP_STRING([--enable-xephyr], [Build the kdrive Xephyr server (default: auto)]), [XEPHYR=$enableval], [XEPHYR=auto])
- AC_ARG_ENABLE(xsdl, AS_HELP_STRING([--enable-xsdl], [Build the kdrive Xsdl server (default: auto)]), [XSDL=$enableval], [XSDL=auto])
-+AC_ARG_ENABLE(w100, AS_HELP_STRING([--enable-w100], [Build the kdrive Xw100 server (default: no)]), [KDRIVEW100=$enableval], [KDRIVEW100=no])
- dnl xprint
- AC_ARG_ENABLE(freetype, AS_HELP_STRING([ --enable-freetype], [Build Xprint FreeType backend (default: yes)]), [XP_USE_FREETYPE=$enableval],[XP_USE_FREETYPE=no])
- AC_ARG_WITH(freetype-config, AS_HELP_STRING([ --with-freetype-config=PROG], [Use FreeType configuration program PROG (default: auto)]), freetype_config=$withval, freetype_config=auto)
-@@ -1519,6 +1520,10 @@
- AC_SUBST([XSDL_LIBS])
- AC_SUBST([XSDL_INCS])
-
-+AM_CONDITIONAL(KDRIVEW100, [test "x$KDRIVEW100" = xyes])
-+if test "x$KDRIVEW100" = xyes; then
-+ AC_DEFINE(KDRIVEW100, 1, [Build Xw100 server])
-+fi
-
- dnl these only go in xkb-config.h (which is shared by the Xorg and Xnest servers)
- AC_DEFINE(__XKBDEFRULES__, "xorg", [Default XKB rules])
-@@ -1753,6 +1758,7 @@
- hw/kdrive/epson/Makefile
- hw/kdrive/fake/Makefile
- hw/kdrive/fbdev/Makefile
-+hw/kdrive/w100/Makefile
- hw/kdrive/i810/Makefile
- hw/kdrive/linux/Makefile
- hw/kdrive/mach64/Makefile
+
diff --git a/packages/xorg-xserver/xserver-kdrive_1.2.0.bb b/packages/xorg-xserver/xserver-kdrive_1.2.0.bb
index 052e9e445e..52fbf86bce 100644
--- a/packages/xorg-xserver/xserver-kdrive_1.2.0.bb
+++ b/packages/xorg-xserver/xserver-kdrive_1.2.0.bb
@@ -12,6 +12,7 @@ SRC_URI = "${XORG_MIRROR}/individual/xserver/xorg-server-${PV}.tar.bz2 \
file://disable-xf86-dga-xorgcfg.patch;patch=1 \
file://enable-xcalibrate.patch;patch=1 \
file://w100.patch;patch=1 \
+ file://w100-autofoo.patch;patch=1 \
file://w100-fix-offscreen-bmp.patch;patch=1 \
file://fbcompositesrc8888revnpx0565.patch;patch=1 \
file://xcalibrate_coords.patch;patch=1 \
diff --git a/packages/xorg-xserver/xserver-kdrive_1.3.0.0.bb b/packages/xorg-xserver/xserver-kdrive_1.3.0.0.bb
index 90ae4a9d1f..7fe176a5da 100644
--- a/packages/xorg-xserver/xserver-kdrive_1.3.0.0.bb
+++ b/packages/xorg-xserver/xserver-kdrive_1.3.0.0.bb
@@ -15,6 +15,7 @@ SRC_URI = "${XORG_MIRROR}/individual/xserver/xorg-server-${PV}.tar.bz2 \
file://hide-cursor-and-ppm-root.patch;patch=1 \
file://xcalibrate_coords.patch;patch=1 \
file://w100.patch;patch=1 \
+ file://w100-autofoo.patch;patch=1 \
file://w100-fix-offscreen-bmp.patch;patch=1 \
"