forked from pool/xorg-x11-server
Accepting request 81831 from X11:XOrg
- update to xorg-server 1.10.4 - VNC patches completely redone by Egbert Eich (N-VNC-*) - Xvnc-pthread.diff: small buildfix required for factory - removed obsolete patches * EXA-mixed-ModifyPixmapHeader-pitch-fixes.-bug-33929.patch * Replace-malloc-with-calloc-to-initialize-the-buffers.patch * U_xserver_fix-pixmaps-lifetime-tracking.patch * commit-5c6a2f9.diff * pad-size-of-system-memory-copy-for-1x1-pixmaps * record-avoid-crash-when-calling-RecordFlushReplyBuff.patch * xorg-server-stop-cpu-eating.diff - adjusted patches * bug534768-prefer_local_symbols.patch * zap_warning_xserver.diff - disabled patches for now * 0001-Xinput-Catch-missing-configlayout-when-deleting-dev.patch * cache-xkbcomp-output-for-fast-start-up.patch * xserver-bg-none-root.patch * 0001-Prevent-XSync-Alarms-from-senslessly-calling-CheckTr.patch - set VIDEO_ABI_VERSION = 10 and INPUT_ABI_VERSION = 12 in specfile OBS-URL: https://build.opensuse.org/request/show/81831 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/xorg-x11-server?expand=0&rev=220
This commit is contained in:
commit
49ac7a830e
@ -1,57 +0,0 @@
|
||||
From 7b3b7efe78dec87c8059ea0d0985f08a97f0633d Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michel=20D=C3=A4nzer?= <daenzer@vmware.com>
|
||||
Date: Thu, 24 Feb 2011 12:17:57 +0100
|
||||
Subject: [PATCH] EXA/mixed: ModifyPixmapHeader pitch fixes. (bug #33929)
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
If there's a GPU copy and a non-zero devKind was passed in, set the GPU copy
|
||||
pitch to that instead of to a possibly bogus value derived from the new width.
|
||||
This is e.g. used by the radeon driver's drmmode_xf86crtc_resize hook, fixes
|
||||
https://bugs.freedesktop.org/show_bug.cgi?id=33929 .
|
||||
|
||||
On the other hand, the system memory copy doesn't need the pitch to be aligned
|
||||
beyond the PixmapBytePad of the width.
|
||||
|
||||
Signed-off-by: Michel Dänzer <daenzer@vmware.com>
|
||||
Acked-by: Cyril Brulebois <kibi@debian.org>
|
||||
Tested-by: Cyril Brulebois <kibi@debian.org>
|
||||
Reported-by: Thierry Vignaud <thierry.vignaud@gmail.com>
|
||||
Tested-by: Thierry Vignaud <thierry.vignaud@gmail.com>
|
||||
Signed-off-by: Keith Packard <keithp@keithp.com>
|
||||
(cherry picked from commit 31704510f448706524b7b7085cc4ff0ada7bfe7e)
|
||||
---
|
||||
exa/exa_mixed.c | 9 +++++----
|
||||
1 files changed, 5 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/exa/exa_mixed.c b/exa/exa_mixed.c
|
||||
index 606f1e1..fd1afb2 100644
|
||||
--- a/exa/exa_mixed.c
|
||||
+++ b/exa/exa_mixed.c
|
||||
@@ -175,8 +175,10 @@ exaModifyPixmapHeader_mixed(PixmapPtr pPixmap, int width, int height, int depth,
|
||||
depth != pPixmap->drawable.depth ||
|
||||
bitsPerPixel != pPixmap->drawable.bitsPerPixel) {
|
||||
if (pExaPixmap->driverPriv) {
|
||||
- exaSetFbPitch(pExaScr, pExaPixmap,
|
||||
- width, height, bitsPerPixel);
|
||||
+ if (devKind > 0)
|
||||
+ pExaPixmap->fb_pitch = devKind;
|
||||
+ else
|
||||
+ exaSetFbPitch(pExaScr, pExaPixmap, width, height, bitsPerPixel);
|
||||
|
||||
exaSetAccelBlock(pExaScr, pExaPixmap,
|
||||
width, height, bitsPerPixel);
|
||||
@@ -187,8 +189,7 @@ exaModifyPixmapHeader_mixed(PixmapPtr pPixmap, int width, int height, int depth,
|
||||
if (has_gpu_copy && pExaPixmap->sys_ptr) {
|
||||
free(pExaPixmap->sys_ptr);
|
||||
pExaPixmap->sys_ptr = NULL;
|
||||
- pExaPixmap->sys_pitch = devKind > 0 ? devKind :
|
||||
- PixmapBytePad(width, depth);
|
||||
+ pExaPixmap->sys_pitch = PixmapBytePad(width, depth);
|
||||
DamageUnregister(&pPixmap->drawable, pExaPixmap->pDamage);
|
||||
DamageDestroy(pExaPixmap->pDamage);
|
||||
pExaPixmap->pDamage = NULL;
|
||||
--
|
||||
1.7.4.1
|
||||
|
File diff suppressed because it is too large
Load Diff
352
N-VNC-Don-t-let-VNC-access-the-framebuffer-directly-an.patch
Normal file
352
N-VNC-Don-t-let-VNC-access-the-framebuffer-directly-an.patch
Normal file
@ -0,0 +1,352 @@
|
||||
From: Michal Srb <msrb@suse.cz>
|
||||
Date: Tue, 6 Sep 2011 13:08:25 +0200
|
||||
Subject: [PATCH 4/6] VNC: Don't let VNC access the framebuffer directly any more.
|
||||
Patch-Mainline: Currently no upstream project.
|
||||
Git-commit: 3e0de1d95b3ffd3988016b2d3f40f577393ad046
|
||||
Signed-off: Egbert Eich <eich@suse.de>
|
||||
References: bnc #653915
|
||||
|
||||
It seems that accessing the framebuffer directly is not a good idea anymore.
|
||||
This patch will let the tight encoding read the screen data using GetImage. It
|
||||
may be little slower, but not dramatically - it already does few GetImage calls
|
||||
on every repaint now.
|
||||
|
||||
Signed-off-by: Egbert Eich <eich@freedesktop.org>
|
||||
---
|
||||
hw/vnc/tight.c | 69 ++++++++++++++++++++++++++++++---------------
|
||||
hw/vnc/vncext.c | 19 ++----------
|
||||
hw/xfree86/vnc/vncInit.c | 11 ++-----
|
||||
hw/xfree86/vnc/vncint.h | 2 -
|
||||
4 files changed, 53 insertions(+), 48 deletions(-)
|
||||
|
||||
diff --git a/hw/vnc/tight.c b/hw/vnc/tight.c
|
||||
index 5c54736..f27c73e 100644
|
||||
--- a/hw/vnc/tight.c
|
||||
+++ b/hw/vnc/tight.c
|
||||
@@ -109,15 +109,17 @@ static unsigned char *tightAfterBuf = NULL;
|
||||
|
||||
static int *prevRowBuf = NULL;
|
||||
|
||||
+static unsigned char* fakeFrameBuffer = NULL;
|
||||
+
|
||||
|
||||
/* Prototypes for static functions. */
|
||||
|
||||
-static void FindBestSolidArea (ScreenPtr pScreen, int x, int y, int w, int h,
|
||||
+static void FindBestSolidArea (rfbClientPtr cl, int x, int y, int w, int h,
|
||||
CARD32 colorValue, int *w_ptr, int *h_ptr);
|
||||
-static void ExtendSolidArea (ScreenPtr pScreen, int x, int y, int w, int h,
|
||||
+static void ExtendSolidArea (rfbClientPtr cl, int x, int y, int w, int h,
|
||||
CARD32 colorValue,
|
||||
int *x_ptr, int *y_ptr, int *w_ptr, int *h_ptr);
|
||||
-static Bool CheckSolidTile (ScreenPtr pScreen, int x, int y, int w, int h,
|
||||
+static Bool CheckSolidTile (rfbClientPtr cl, int x, int y, int w, int h,
|
||||
CARD32 *colorPtr, Bool needSameColor);
|
||||
static Bool CheckSolidTile8 (ScreenPtr pScreen, int x, int y, int w, int h,
|
||||
CARD32 *colorPtr, Bool needSameColor);
|
||||
@@ -126,6 +128,7 @@ static Bool CheckSolidTile16 (ScreenPtr pScreen, int x, int y, int w, int h,
|
||||
static Bool CheckSolidTile32 (ScreenPtr pScreen, int x, int y, int w, int h,
|
||||
CARD32 *colorPtr, Bool needSameColor);
|
||||
|
||||
+static Bool SendRectEncodingTight(rfbClientPtr cl, int x, int y, int w, int h);
|
||||
static Bool SendRectSimple (rfbClientPtr cl, int x, int y, int w, int h);
|
||||
static Bool SendSubrect (rfbClientPtr cl, int x, int y, int w, int h);
|
||||
static Bool SendTightHeader (rfbClientPtr cl, int x, int y, int w, int h);
|
||||
@@ -211,6 +214,25 @@ rfbSendRectEncodingTight(rfbClientPtr cl,
|
||||
int x, int y, int w, int h)
|
||||
{
|
||||
VNCSCREENPTR(cl->pScreen);
|
||||
+
|
||||
+ /* Copy the rectangle to the fake buffer for CheckSolidTile functions. */
|
||||
+
|
||||
+ if(!fakeFrameBuffer) fakeFrameBuffer = malloc(pVNC->width * pVNC->height * cl->format.bitsPerPixel / 8);
|
||||
+ (*cl->translateFn)(cl->pScreen, cl->translateLookupTable,
|
||||
+ &pVNC->rfbServerFormat,
|
||||
+ &cl->format, fakeFrameBuffer + (y * pVNC->width * cl->format.bitsPerPixel / 8),
|
||||
+ pVNC->paddedWidthInBytes, pVNC->width, h, 0, y);
|
||||
+
|
||||
+ /* Call the inner part */
|
||||
+
|
||||
+ return SendRectEncodingTight(cl, x, y, w, h);
|
||||
+}
|
||||
+
|
||||
+static Bool
|
||||
+SendRectEncodingTight(rfbClientPtr cl,
|
||||
+ int x, int y, int w, int h)
|
||||
+{
|
||||
+ VNCSCREENPTR(cl->pScreen);
|
||||
int nMaxRows;
|
||||
CARD32 colorValue;
|
||||
int dx, dy, dw, dh;
|
||||
@@ -247,7 +269,7 @@ rfbSendRectEncodingTight(rfbClientPtr cl,
|
||||
nMaxWidth = (w > maxRectWidth) ? maxRectWidth : w;
|
||||
nMaxRows = maxRectSize / nMaxWidth;
|
||||
}
|
||||
-
|
||||
+
|
||||
/* Try to find large solid-color areas and send them separately. */
|
||||
|
||||
for (dy = y; dy < y + h; dy += MAX_SPLIT_TILE_SIZE) {
|
||||
@@ -269,11 +291,11 @@ rfbSendRectEncodingTight(rfbClientPtr cl,
|
||||
dw = (dx + MAX_SPLIT_TILE_SIZE <= x + w) ?
|
||||
MAX_SPLIT_TILE_SIZE : (x + w - dx);
|
||||
|
||||
- if (CheckSolidTile(cl->pScreen, dx, dy, dw, dh, &colorValue, FALSE)) {
|
||||
+ if (CheckSolidTile(cl, dx, dy, dw, dh, &colorValue, FALSE)) {
|
||||
|
||||
/* Get dimensions of solid-color area. */
|
||||
|
||||
- FindBestSolidArea(cl->pScreen, dx, dy, w - (dx - x), h - (dy - y),
|
||||
+ FindBestSolidArea(cl, dx, dy, w - (dx - x), h - (dy - y),
|
||||
colorValue, &w_best, &h_best);
|
||||
|
||||
/* Make sure a solid rectangle is large enough
|
||||
@@ -286,7 +308,7 @@ rfbSendRectEncodingTight(rfbClientPtr cl,
|
||||
/* Try to extend solid rectangle to maximum size. */
|
||||
|
||||
x_best = dx; y_best = dy;
|
||||
- ExtendSolidArea(cl->pScreen, x, y, w, h, colorValue,
|
||||
+ ExtendSolidArea(cl, x, y, w, h, colorValue,
|
||||
&x_best, &y_best, &w_best, &h_best);
|
||||
|
||||
/* Send rectangles at top and left to solid-color area. */
|
||||
@@ -295,7 +317,7 @@ rfbSendRectEncodingTight(rfbClientPtr cl,
|
||||
!SendRectSimple(cl, x, y, w, y_best-y) )
|
||||
return FALSE;
|
||||
if ( x_best != x &&
|
||||
- !rfbSendRectEncodingTight(cl, x, y_best,
|
||||
+ !SendRectEncodingTight(cl, x, y_best,
|
||||
x_best-x, h_best) )
|
||||
return FALSE;
|
||||
|
||||
@@ -316,11 +338,11 @@ rfbSendRectEncodingTight(rfbClientPtr cl,
|
||||
/* Send remaining rectangles (at right and bottom). */
|
||||
|
||||
if ( x_best + w_best != x + w &&
|
||||
- !rfbSendRectEncodingTight(cl, x_best+w_best, y_best,
|
||||
+ !SendRectEncodingTight(cl, x_best+w_best, y_best,
|
||||
w-(x_best-x)-w_best, h_best) )
|
||||
return FALSE;
|
||||
if ( y_best + h_best != y + h &&
|
||||
- !rfbSendRectEncodingTight(cl, x, y_best+h_best,
|
||||
+ !SendRectEncodingTight(cl, x, y_best+h_best,
|
||||
w, h-(y_best-y)-h_best) )
|
||||
return FALSE;
|
||||
|
||||
@@ -339,7 +361,7 @@ rfbSendRectEncodingTight(rfbClientPtr cl,
|
||||
}
|
||||
|
||||
static void
|
||||
-FindBestSolidArea(ScreenPtr pScreen,
|
||||
+FindBestSolidArea(rfbClientPtr cl,
|
||||
int x, int y, int w, int h,
|
||||
CARD32 colorValue,
|
||||
int *w_ptr, int *h_ptr)
|
||||
@@ -357,13 +379,13 @@ FindBestSolidArea(ScreenPtr pScreen,
|
||||
dw = (w_prev > MAX_SPLIT_TILE_SIZE) ?
|
||||
MAX_SPLIT_TILE_SIZE : w_prev;
|
||||
|
||||
- if (!CheckSolidTile(pScreen, x, dy, dw, dh, &colorValue, TRUE))
|
||||
+ if (!CheckSolidTile(cl, x, dy, dw, dh, &colorValue, TRUE))
|
||||
break;
|
||||
|
||||
for (dx = x + dw; dx < x + w_prev;) {
|
||||
dw = (dx + MAX_SPLIT_TILE_SIZE <= x + w_prev) ?
|
||||
MAX_SPLIT_TILE_SIZE : (x + w_prev - dx);
|
||||
- if (!CheckSolidTile(pScreen, dx, dy, dw, dh, &colorValue, TRUE))
|
||||
+ if (!CheckSolidTile(cl, dx, dy, dw, dh, &colorValue, TRUE))
|
||||
break;
|
||||
dx += dw;
|
||||
}
|
||||
@@ -380,7 +402,7 @@ FindBestSolidArea(ScreenPtr pScreen,
|
||||
}
|
||||
|
||||
static void
|
||||
-ExtendSolidArea(ScreenPtr pScreen, int x, int y, int w, int h,
|
||||
+ExtendSolidArea(rfbClientPtr cl, int x, int y, int w, int h,
|
||||
CARD32 colorValue,
|
||||
int *x_ptr, int *y_ptr, int *w_ptr, int *h_ptr)
|
||||
{
|
||||
@@ -388,7 +410,7 @@ ExtendSolidArea(ScreenPtr pScreen, int x, int y, int w, int h,
|
||||
|
||||
/* Try to extend the area upwards. */
|
||||
for ( cy = *y_ptr - 1;
|
||||
- cy >= y && CheckSolidTile(pScreen, *x_ptr, cy, *w_ptr, 1, &colorValue, TRUE);
|
||||
+ cy >= y && CheckSolidTile(cl, *x_ptr, cy, *w_ptr, 1, &colorValue, TRUE);
|
||||
cy-- );
|
||||
*h_ptr += *y_ptr - (cy + 1);
|
||||
*y_ptr = cy + 1;
|
||||
@@ -396,13 +418,13 @@ ExtendSolidArea(ScreenPtr pScreen, int x, int y, int w, int h,
|
||||
/* ... downwards. */
|
||||
for ( cy = *y_ptr + *h_ptr;
|
||||
cy < y + h &&
|
||||
- CheckSolidTile(pScreen, *x_ptr, cy, *w_ptr, 1, &colorValue, TRUE);
|
||||
+ CheckSolidTile(cl, *x_ptr, cy, *w_ptr, 1, &colorValue, TRUE);
|
||||
cy++ );
|
||||
*h_ptr += cy - (*y_ptr + *h_ptr);
|
||||
|
||||
/* ... to the left. */
|
||||
for ( cx = *x_ptr - 1;
|
||||
- cx >= x && CheckSolidTile(pScreen, cx, *y_ptr, 1, *h_ptr, &colorValue, TRUE);
|
||||
+ cx >= x && CheckSolidTile(cl, cx, *y_ptr, 1, *h_ptr, &colorValue, TRUE);
|
||||
cx-- );
|
||||
*w_ptr += *x_ptr - (cx + 1);
|
||||
*x_ptr = cx + 1;
|
||||
@@ -410,7 +432,7 @@ ExtendSolidArea(ScreenPtr pScreen, int x, int y, int w, int h,
|
||||
/* ... to the right. */
|
||||
for ( cx = *x_ptr + *w_ptr;
|
||||
cx < x + w &&
|
||||
- CheckSolidTile(pScreen, cx, *y_ptr, 1, *h_ptr, &colorValue, TRUE);
|
||||
+ CheckSolidTile(cl, cx, *y_ptr, 1, *h_ptr, &colorValue, TRUE);
|
||||
cx++ );
|
||||
*w_ptr += cx - (*x_ptr + *w_ptr);
|
||||
}
|
||||
@@ -423,11 +445,12 @@ ExtendSolidArea(ScreenPtr pScreen, int x, int y, int w, int h,
|
||||
*/
|
||||
|
||||
static Bool
|
||||
-CheckSolidTile(ScreenPtr pScreen, int x, int y, int w, int h, CARD32 *colorPtr,
|
||||
+CheckSolidTile(rfbClientPtr cl, int x, int y, int w, int h, CARD32 *colorPtr,
|
||||
Bool needSameColor)
|
||||
{
|
||||
- VNCSCREENPTR(pScreen);
|
||||
- switch(pVNC->rfbServerFormat.bitsPerPixel) {
|
||||
+ ScreenPtr pScreen = cl->pScreen;
|
||||
+
|
||||
+ switch(cl->format.bitsPerPixel) {
|
||||
case 32:
|
||||
return CheckSolidTile32(pScreen, x, y, w, h, colorPtr, needSameColor);
|
||||
case 16:
|
||||
@@ -449,7 +472,7 @@ static Bool \
|
||||
int dx, dy; \
|
||||
\
|
||||
fbptr = (CARD##bpp *) \
|
||||
- &pVNC->pfbMemory[y * pVNC->paddedWidthInBytes + x * (bpp/8)]; \
|
||||
+ &fakeFrameBuffer[(y * pVNC->width + x) * (bpp/8)]; \
|
||||
\
|
||||
colorValue = *fbptr; \
|
||||
if (needSameColor && (CARD32)colorValue != *colorPtr) \
|
||||
@@ -460,7 +483,7 @@ static Bool \
|
||||
if (colorValue != fbptr[dx]) \
|
||||
return FALSE; \
|
||||
} \
|
||||
- fbptr = (CARD##bpp *)((CARD8 *)fbptr + pVNC->paddedWidthInBytes); \
|
||||
+ fbptr = (CARD##bpp *)((CARD8 *)fbptr + pVNC->width * (bpp/8)); \
|
||||
} \
|
||||
\
|
||||
*colorPtr = (CARD32)colorValue; \
|
||||
diff --git a/hw/vnc/vncext.c b/hw/vnc/vncext.c
|
||||
index ea913b7..534f3f5 100644
|
||||
--- a/hw/vnc/vncext.c
|
||||
+++ b/hw/vnc/vncext.c
|
||||
@@ -702,15 +702,7 @@ CreateResourceTypes(void)
|
||||
|
||||
static unsigned long vncExtGeneration = 0;
|
||||
#if XFREE86VNC
|
||||
-extern Bool VNCInit(ScreenPtr pScreen, unsigned char *FBStart);
|
||||
-
|
||||
-/* copied from miscrinit.c */
|
||||
-typedef struct
|
||||
-{
|
||||
- pointer pbits; /* pointer to framebuffer */
|
||||
- int width; /* delta to add to a framebuffer addr to move one row down */
|
||||
-} miScreenInitParmsRec, *miScreenInitParmsPtr;
|
||||
-
|
||||
+extern Bool VNCInit(ScreenPtr pScreen);
|
||||
|
||||
static Bool
|
||||
vncCreateScreenResources(ScreenPtr pScreen)
|
||||
@@ -719,9 +711,6 @@ vncCreateScreenResources(ScreenPtr pScreen)
|
||||
CreateScreenResourcesProcPtr CreateScreenResources =
|
||||
(CreateScreenResourcesProcPtr)
|
||||
dixLookupPrivate(&pScreen->devPrivates, vncCreateScreenResourcesKey);
|
||||
- miScreenInitParmsPtr pScrInitParms;
|
||||
-
|
||||
- pScrInitParms = (miScreenInitParmsPtr)pScreen->devPrivate;
|
||||
|
||||
if ( pScreen->CreateScreenResources != vncCreateScreenResources ) {
|
||||
/* Can't find hook we are hung on */
|
||||
@@ -732,9 +721,6 @@ vncCreateScreenResources(ScreenPtr pScreen)
|
||||
(void *) pScreen->CreateScreenResources );
|
||||
}
|
||||
|
||||
- /* Now do our stuff */
|
||||
- VNCInit(pScreen, pScrInitParms->pbits);
|
||||
-
|
||||
/* Unhook this function ... */
|
||||
pScreen->CreateScreenResources = CreateScreenResources;
|
||||
dixSetPrivate(&pScreen->devPrivates, vncCreateScreenResourcesKey, NULL);
|
||||
@@ -744,6 +730,9 @@ vncCreateScreenResources(ScreenPtr pScreen)
|
||||
ret = (*pScreen->CreateScreenResources)(pScreen);
|
||||
}
|
||||
|
||||
+ /* Now do our stuff */
|
||||
+ VNCInit(pScreen);
|
||||
+
|
||||
#ifdef DEBUG
|
||||
ErrorF("vncCreateScreenResources() returns %d\n", ret);
|
||||
#endif
|
||||
diff --git a/hw/xfree86/vnc/vncInit.c b/hw/xfree86/vnc/vncInit.c
|
||||
index 4a124fb..8b2fa5f 100644
|
||||
--- a/hw/xfree86/vnc/vncInit.c
|
||||
+++ b/hw/xfree86/vnc/vncInit.c
|
||||
@@ -49,7 +49,7 @@ extern void VncExtensionInit(void);
|
||||
|
||||
extern void vncInitMouse(void);
|
||||
extern void vncInitKeyb(void);
|
||||
-Bool VNCInit(ScreenPtr pScreen, unsigned char *FBStart);
|
||||
+Bool VNCInit(ScreenPtr pScreen);
|
||||
|
||||
#ifndef XFree86LOADER
|
||||
static unsigned long VNCGeneration = 0;
|
||||
@@ -151,7 +151,7 @@ void rfbLogPerror(char *str)
|
||||
* Called by vncCreateScreenResources()
|
||||
*/
|
||||
Bool
|
||||
-VNCInit(ScreenPtr pScreen, unsigned char *FBStart)
|
||||
+VNCInit(ScreenPtr pScreen)
|
||||
{
|
||||
ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
|
||||
VisualPtr visual;
|
||||
@@ -164,9 +164,6 @@ VNCInit(ScreenPtr pScreen, unsigned char *FBStart)
|
||||
PictureScreenPtr ps;
|
||||
#endif
|
||||
|
||||
- if (!FBStart)
|
||||
- return FALSE;
|
||||
-
|
||||
#ifndef XFree86LOADER
|
||||
if (VNCGeneration != serverGeneration) {
|
||||
VncExtensionInit();
|
||||
@@ -287,9 +284,7 @@ VNCInit(ScreenPtr pScreen, unsigned char *FBStart)
|
||||
pScreenPriv->depth = pScrn->depth;
|
||||
pScreenPriv->paddedWidthInBytes = PixmapBytePad(pScrn->displayWidth, pScrn->depth);
|
||||
pScreenPriv->bitsPerPixel = rfbBitsPerPixel(pScrn->depth);
|
||||
- pScreenPriv->pfbMemory = FBStart;
|
||||
- pScreenPriv->oldpfbMemory = FBStart;
|
||||
-
|
||||
+
|
||||
pScreenPriv->cursorIsDrawn = TRUE;
|
||||
pScreenPriv->dontSendFramebufferUpdate = FALSE;
|
||||
|
||||
diff --git a/hw/xfree86/vnc/vncint.h b/hw/xfree86/vnc/vncint.h
|
||||
index 18a3630..9e4a36f 100644
|
||||
--- a/hw/xfree86/vnc/vncint.h
|
||||
+++ b/hw/xfree86/vnc/vncint.h
|
||||
@@ -44,13 +44,11 @@ typedef struct {
|
||||
size_t buf_filled;
|
||||
int maxFd;
|
||||
fd_set allFds;
|
||||
- unsigned char * oldpfbMemory;
|
||||
Bool rfbAlwaysShared;
|
||||
Bool rfbNeverShared;
|
||||
Bool rfbDontDisconnect;
|
||||
Bool rfbUserAccept;
|
||||
Bool rfbViewOnly;
|
||||
- unsigned char * pfbMemory;
|
||||
int paddedWidthInBytes;
|
||||
ColormapPtr rfbInstalledColormap;
|
||||
ColormapPtr savedColormap;
|
||||
--
|
||||
1.7.3.4
|
||||
|
@ -1,5 +1,10 @@
|
||||
bnc #660797,#605015,#400520
|
||||
Enable use of all keyboard layouts, independent of remotely set layout
|
||||
From: Matthias Hopf <mhopf@suse.de>
|
||||
Date: Tue, 6 Sep 2011 08:35:57 +0200
|
||||
Subject: [PATCH 5/6] VNC: Enable use of all keyboard layouts, independent of remotely set layout
|
||||
Patch-Mainline: Currently no upstream project.
|
||||
Git-commit: 6885b927a6065e6379cfaa3ebbf6c51445a015d9
|
||||
Signed-off: Egbert Eich <eich@suse.de>
|
||||
References: bnc #400520, #605015, #660797
|
||||
|
||||
Changes:
|
||||
|
||||
@ -22,24 +27,39 @@ Changes:
|
||||
Previous broken version lead to e.g. Shift+PgUp not being recognized.
|
||||
- Add tons of debug output (disabled).
|
||||
|
||||
mhopf@suse.de
|
||||
Signed-off-by: Egbert Eich <eich@freedesktop.org>
|
||||
---
|
||||
hw/vnc/kbdptr.c | 289 +++++++++++++++++++++++++++++++++++++++++------------
|
||||
hw/vnc/keyboard.h | 1 +
|
||||
2 files changed, 228 insertions(+), 62 deletions(-)
|
||||
|
||||
Index: xorg-server-1.9.3/hw/vnc/kbdptr.c
|
||||
===================================================================
|
||||
--- xorg-server-1.9.3.orig/hw/vnc/kbdptr.c
|
||||
+++ xorg-server-1.9.3/hw/vnc/kbdptr.c
|
||||
@@ -33,6 +33,8 @@
|
||||
#define NEED_EVENTS
|
||||
diff --git a/hw/vnc/kbdptr.c b/hw/vnc/kbdptr.c
|
||||
index f306022..b3b0e68 100644
|
||||
--- a/hw/vnc/kbdptr.c
|
||||
+++ b/hw/vnc/kbdptr.c
|
||||
@@ -34,6 +34,8 @@
|
||||
#include "X11/Xproto.h"
|
||||
#include "inputstr.h"
|
||||
#include "inpututils.h"
|
||||
+#include "xkbsrv.h"
|
||||
+#include "xkbstr.h"
|
||||
#define XK_CYRILLIC
|
||||
#include <X11/keysym.h>
|
||||
#include <X11/Xatom.h>
|
||||
@@ -46,19 +48,17 @@
|
||||
@@ -46,6 +48,7 @@
|
||||
#include "dmxinput.h"
|
||||
#endif
|
||||
|
||||
+#if 0
|
||||
#if !XFREE86VNC
|
||||
|
||||
#define MIN_KEY_CODE 8
|
||||
@@ -196,21 +199,20 @@ static KeySym map[MAX_KEY_CODE * GLYPHS_PER_KEY] = {
|
||||
#define N_PREDEFINED_KEYS (sizeof(map) / (sizeof(KeySym) * GLYPHS_PER_KEY))
|
||||
|
||||
#endif
|
||||
+#endif
|
||||
|
||||
#define KEY_IS_PRESSED(keycode) \
|
||||
- (kbdDevice->key->down[(keycode) >> 3] & (1 << ((keycode) & 7)))
|
||||
+ (inputInfo.keyboard->key->down[(keycode) >> 3] & (1 << ((keycode) & 7)))
|
||||
@ -60,7 +80,7 @@ Index: xorg-server-1.9.3/hw/vnc/kbdptr.c
|
||||
}
|
||||
|
||||
|
||||
@@ -126,6 +126,29 @@ EnqueueKey(DeviceIntPtr kbdDev, int type
|
||||
@@ -280,6 +282,29 @@ EnqueueKey(DeviceIntPtr kbdDev, int type, int detail)
|
||||
mieqEnqueue(kbdDev, (InternalEvent*)(events + i)->event);
|
||||
}
|
||||
|
||||
@ -90,7 +110,7 @@ Index: xorg-server-1.9.3/hw/vnc/kbdptr.c
|
||||
/*
|
||||
* Called when the rfbserver receives a rfbKeyEvent event from a client.
|
||||
* Put an X keyboard event into the event queue.
|
||||
@@ -134,21 +157,35 @@ void
|
||||
@@ -288,21 +313,35 @@ void
|
||||
KbdAddEvent(Bool down, KeySym keySym, rfbClientPtr cl)
|
||||
{
|
||||
const int type = down ? KeyPress : KeyRelease;
|
||||
@ -128,13 +148,13 @@ Index: xorg-server-1.9.3/hw/vnc/kbdptr.c
|
||||
+ group = xkbInfo->state.group;
|
||||
+ level = (KEY_IS_PRESSED(ISO_LEVEL3_KEY_CODE) ? 2 : 0) |
|
||||
+ (XkbStateFieldFromRec(&xkbInfo->state) & ShiftMask ? 1 : 0);
|
||||
+#if 0
|
||||
+#ifdef DEBUG
|
||||
+ ErrorF ("VNCkbd:\t%s Sym %04x\n", down ? "+":"-", (int)keySym);
|
||||
+#endif
|
||||
|
||||
#ifdef CORBA
|
||||
if (cl) {
|
||||
@@ -166,6 +203,12 @@ KbdAddEvent(Bool down, KeySym keySym, rf
|
||||
@@ -320,6 +359,12 @@ KbdAddEvent(Bool down, KeySym keySym, rfbClientPtr cl)
|
||||
*
|
||||
* Alan.
|
||||
*/
|
||||
@ -143,11 +163,11 @@ Index: xorg-server-1.9.3/hw/vnc/kbdptr.c
|
||||
+ * keyboard layouts. Not being able to work with non-local xmodmaps
|
||||
+ * is a nuisance at worst, and probably even preferred.
|
||||
+ * 2011-04-15 mhopf@suse.de */
|
||||
+#if 0
|
||||
+#ifdef NOTANYMORE
|
||||
#if !XFREE86VNC
|
||||
/* First check if it's one of our predefined keys. If so then we can make
|
||||
some attempt at allowing an xmodmap inside a VNC desktop behave
|
||||
@@ -192,107 +235,229 @@ KbdAddEvent(Bool down, KeySym keySym, rf
|
||||
@@ -346,107 +391,227 @@ KbdAddEvent(Bool down, KeySym keySym, rfbClientPtr cl)
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@ -163,30 +183,7 @@ Index: xorg-server-1.9.3/hw/vnc/kbdptr.c
|
||||
- "less than 2 keysyms per keycode (KeySym 0x%x)\n", (int)keySym);
|
||||
- return;
|
||||
- }
|
||||
+ for (keyCode = MIN_KEY_CODE; keyCode < MIN_KEY_CODE + NO_OF_KEYS; keyCode++) {
|
||||
+ /* Check all keycodes, but only continue on those where
|
||||
+ * backconversion results in keySym.
|
||||
+ * 2011-05-20 mhopf@suse.de */
|
||||
+ int j;
|
||||
+
|
||||
+#if 0
|
||||
+ ErrorF (" keyCode %3d map# %4d++ level %d of %d: keySyms",
|
||||
+ keyCode, (i / keySyms->mapWidth) * keySyms->mapWidth,
|
||||
+ i % keySyms->mapWidth, keySyms->mapWidth);
|
||||
+ for (j = 0; j < keySyms->mapWidth; j++)
|
||||
+ ErrorF (" %02x", (int)keySyms->map[(i / keySyms->mapWidth) * keySyms->mapWidth + j]);
|
||||
+ ErrorF ("\n");
|
||||
+#endif
|
||||
+#if 0
|
||||
+ ErrorF (" group %d of %d width %d: keySyms",
|
||||
+ group, XkbKeyNumGroups(xkbInfo->desc, keyCode),
|
||||
+ XkbKeyGroupWidth(xkbInfo->desc, keyCode, group));
|
||||
+ if (XkbKeyNumGroups(xkbInfo->desc, keyCode) > group)
|
||||
+ for (j = 0; j < XkbKeyGroupWidth(xkbInfo->desc, keyCode, group); j++)
|
||||
+ ErrorF (" %02x", (int) XkbKeySymEntry(xkbInfo->desc, keyCode, j, group));
|
||||
+ ErrorF ("\n");
|
||||
+#endif
|
||||
|
||||
-
|
||||
- for (i = 0; i < NO_OF_KEYS * keySyms->mapWidth; i++) {
|
||||
- if (keySym == keySyms->map[i]) {
|
||||
- keyCode = MIN_KEY_CODE + i / keySyms->mapWidth;
|
||||
@ -196,7 +193,28 @@ Index: xorg-server-1.9.3/hw/vnc/kbdptr.c
|
||||
-
|
||||
- /* this keycode has more than one symbol associated with
|
||||
- it, so shift state is important */
|
||||
-
|
||||
+ for (keyCode = MIN_KEY_CODE; keyCode < MIN_KEY_CODE + NO_OF_KEYS; keyCode++) {
|
||||
+ /* Check all keycodes, but only continue on those where
|
||||
+ * backconversion results in keySym.
|
||||
+ * 2011-05-20 mhopf@suse.de */
|
||||
+
|
||||
+#ifdef DEBUG
|
||||
+ int j;
|
||||
+ ErrorF (" keyCode %3d map# %4d++ level %d of %d: keySyms",
|
||||
+ keyCode, (i / keySyms->mapWidth) * keySyms->mapWidth,
|
||||
+ i % keySyms->mapWidth, keySyms->mapWidth);
|
||||
+ for (j = 0; j < keySyms->mapWidth; j++)
|
||||
+ ErrorF (" %02x", (int)keySyms->map[(i / keySyms->mapWidth) * keySyms->mapWidth + j]);
|
||||
+ ErrorF ("\n");
|
||||
+ ErrorF (" group %d of %d width %d: keySyms",
|
||||
+ group, XkbKeyNumGroups(xkbInfo->desc, keyCode),
|
||||
+ XkbKeyGroupWidth(xkbInfo->desc, keyCode, group));
|
||||
+ if (XkbKeyNumGroups(xkbInfo->desc, keyCode) > group)
|
||||
+ for (j = 0; j < XkbKeyGroupWidth(xkbInfo->desc, keyCode, group); j++)
|
||||
+ ErrorF (" %02x", (int) XkbKeySymEntry(xkbInfo->desc, keyCode, j, group));
|
||||
+ ErrorF ("\n");
|
||||
+#endif
|
||||
|
||||
- if ((i % keySyms->mapWidth) == 0)
|
||||
- shiftMustBeReleased = TRUE;
|
||||
- else
|
||||
@ -256,7 +274,7 @@ Index: xorg-server-1.9.3/hw/vnc/kbdptr.c
|
||||
+ /* A keyCode is free if no groups are assigned at all */
|
||||
+ if (XkbKeyNumGroups(xkbInfo->desc, keyCode) == 0)
|
||||
+ break;
|
||||
+#if 0
|
||||
+#ifdef NOTANYMORE
|
||||
+ /* We can use exact map positions for group 1+2, but only partially
|
||||
+ * filling out xkb legacy maps may suddenly change the # of groups.
|
||||
+ * Reason for that is unknown yet. Might be related to (fixed) NoSymbol issue.
|
||||
@ -302,7 +320,7 @@ Index: xorg-server-1.9.3/hw/vnc/kbdptr.c
|
||||
+ /* Adding keys is not using xkb mechanisms yet, but relying on support
|
||||
+ * for changing keys in the legacy map. Should be changed, eventually.
|
||||
+ * 2011-05-19 mhopf@suse.de */
|
||||
+#if 0
|
||||
+#ifdef NOTANYMORE
|
||||
+ if (group < 2) {
|
||||
+ /* Only set mapping for active group. Will only work with dual layouts.
|
||||
+ * 2011-05-23 mhopf@suse.de */
|
||||
@ -347,7 +365,7 @@ Index: xorg-server-1.9.3/hw/vnc/kbdptr.c
|
||||
}
|
||||
|
||||
- xkb = &kbdDevice->key->xkbInfo->state;
|
||||
+#if 0
|
||||
+#ifdef DEBUG
|
||||
+ ErrorF ("\t%s Sym %04x Code%3d\tState x%02x %s%s%s\tSh %s%s\tL3 %s%s\n",
|
||||
+ down ? "+":"-", (int)keySym, keyCode, XkbStateFieldFromRec(&xkbInfo->state),
|
||||
+ KEY_IS_PRESSED(SHIFT_L_KEY_CODE) ? "Sl":"",
|
||||
@ -356,7 +374,7 @@ Index: xorg-server-1.9.3/hw/vnc/kbdptr.c
|
||||
+ shiftMustBePressed ? "+":"", shiftMustBeReleased ? "-":"",
|
||||
+ level3MustBePressed ? "+":"", level3MustBeReleased ? "-":"");
|
||||
+#endif
|
||||
+#if 0
|
||||
+#ifdef NOTANYMORE
|
||||
+ int back = _XkbKeycodeToKeysym (xkbInfo->desc, keyCode, group,
|
||||
+ ((level3MustBePressed || (!level3MustBeReleased && (level & 2))) ? 2 : 0) |
|
||||
+ ((shiftMustBePressed || (!shiftMustBeReleased && (level & 1))) ? 1 : 0));
|
||||
@ -422,7 +440,7 @@ Index: xorg-server-1.9.3/hw/vnc/kbdptr.c
|
||||
}
|
||||
}
|
||||
|
||||
@@ -343,15 +508,15 @@ KbdReleaseAllKeys(void)
|
||||
@@ -497,15 +662,15 @@ KbdReleaseAllKeys(void)
|
||||
{
|
||||
int i, j;
|
||||
|
||||
@ -442,15 +460,15 @@ Index: xorg-server-1.9.3/hw/vnc/kbdptr.c
|
||||
}
|
||||
}
|
||||
}
|
||||
Index: xorg-server-1.9.3/hw/vnc/keyboard.h
|
||||
===================================================================
|
||||
--- xorg-server-1.9.3.orig/hw/vnc/keyboard.h
|
||||
+++ xorg-server-1.9.3/hw/vnc/keyboard.h
|
||||
@@ -32,6 +32,7 @@
|
||||
diff --git a/hw/vnc/keyboard.h b/hw/vnc/keyboard.h
|
||||
index d223b6b..beb948a 100644
|
||||
--- a/hw/vnc/keyboard.h
|
||||
+++ b/hw/vnc/keyboard.h
|
||||
@@ -32,3 +32,4 @@
|
||||
#define META_R_KEY_CODE (MIN_KEY_CODE + 108)
|
||||
#define ALT_L_KEY_CODE (MIN_KEY_CODE + 56)
|
||||
#define ALT_R_KEY_CODE (MIN_KEY_CODE + 105)
|
||||
+#define ISO_LEVEL3_KEY_CODE ALT_R_KEY_CODE
|
||||
|
||||
static KeySym map[MAX_KEY_CODE * GLYPHS_PER_KEY] = {
|
||||
/* 0x00 */ NoSymbol, NoSymbol, NoSymbol, NoSymbol,
|
||||
+#define ISO_LEVEL3_KEY_CODE ALT_R_KEY_CODE
|
||||
--
|
||||
1.7.3.4
|
||||
|
125
N-VNC-Fix-crash-due-to-unset-input-device-names.patch
Normal file
125
N-VNC-Fix-crash-due-to-unset-input-device-names.patch
Normal file
@ -0,0 +1,125 @@
|
||||
From: Egbert Eich <eich@freedesktop.org>
|
||||
Date: Tue, 6 Sep 2011 14:58:28 +0200
|
||||
Subject: [PATCH 6/6] VNC: Fix crash due to unset input device names.
|
||||
Patch-Mainline: Currently no upstream project.
|
||||
Git-commit: b756a7efff37021ca503fe1e63084daae4082e9d
|
||||
Signed-off: Egbert Eich <eich@suse.de>
|
||||
References: bnc #716074
|
||||
|
||||
Signed-off-by: Egbert Eich <eich@freedesktop.org>
|
||||
|
||||
---
|
||||
hw/vnc/init.c | 2 +-
|
||||
hw/vnc/rfb.h | 2 +-
|
||||
hw/vnc/rfbkeyb.c | 7 +++++--
|
||||
hw/vnc/rfbmouse.c | 9 +++++++--
|
||||
4 files changed, 14 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/hw/vnc/init.c b/hw/vnc/init.c
|
||||
index 0977fee..6f83aa8 100644
|
||||
--- a/hw/vnc/init.c
|
||||
+++ b/hw/vnc/init.c
|
||||
@@ -816,7 +816,7 @@ rfbMouseProc(DeviceIntPtr pDevice, int onoff)
|
||||
switch (onoff)
|
||||
{
|
||||
case DEVICE_INIT:
|
||||
- PtrDeviceInit();
|
||||
+ PtrDeviceInit(pDevice, "vncMouse");
|
||||
map[1] = 1;
|
||||
map[2] = 2;
|
||||
map[3] = 3;
|
||||
diff --git a/hw/vnc/rfb.h b/hw/vnc/rfb.h
|
||||
index 70b1a45..aa9abab 100644
|
||||
--- a/hw/vnc/rfb.h
|
||||
+++ b/hw/vnc/rfb.h
|
||||
@@ -578,7 +578,7 @@ extern void rfbGotXCutText(char *str, int len);
|
||||
extern Bool compatibleKbd;
|
||||
extern unsigned char ptrAcceleration;
|
||||
|
||||
-extern void PtrDeviceInit(void);
|
||||
+extern void PtrDeviceInit(DeviceIntPtr pDevice, char *name);
|
||||
extern void PtrDeviceOn(DeviceIntPtr pDev);
|
||||
extern void PtrDeviceOff(void);
|
||||
extern void PtrDeviceControl(DeviceIntPtr dev, PtrCtrl *ctrl);
|
||||
diff --git a/hw/vnc/rfbkeyb.c b/hw/vnc/rfbkeyb.c
|
||||
index 4da29c2..6d97999 100644
|
||||
--- a/hw/vnc/rfbkeyb.c
|
||||
+++ b/hw/vnc/rfbkeyb.c
|
||||
@@ -36,6 +36,7 @@
|
||||
#endif
|
||||
#include <xf86Xinput.h>
|
||||
#include <exevents.h> /* Needed for InitValuator/Proximity stuff */
|
||||
+#include <extinit.h>
|
||||
#include <mipointer.h>
|
||||
|
||||
#ifdef XFree86LOADER
|
||||
@@ -49,7 +50,6 @@
|
||||
|
||||
|
||||
extern void rfbSendBell(void);
|
||||
-extern DeviceIntPtr kbdDevice;
|
||||
extern void vncInitKeyb(void);
|
||||
|
||||
#include <X11/keysym.h>
|
||||
@@ -212,11 +212,15 @@ static KeySym map[MAX_KEY_CODE * GLYPHS_PER_KEY] = {
|
||||
};
|
||||
|
||||
#define N_PREDEFINED_KEYS (sizeof(map) / (sizeof(KeySym) * GLYPHS_PER_KEY))
|
||||
+#define RFB_KEYB "rfbKeyb"
|
||||
|
||||
void
|
||||
KbdDeviceInit(DeviceIntPtr pDevice, KeySymsPtr pKeySyms, CARD8 *pModMap)
|
||||
{
|
||||
int i;
|
||||
+ Atom atom = MakeAtom(RFB_KEYB, strlen(RFB_KEYB), TRUE);
|
||||
+
|
||||
+ AssignTypeAndName(pDevice, atom, RFB_KEYB);
|
||||
|
||||
for (i = 0; i < MAP_LENGTH; i++)
|
||||
pModMap[i] = NoSymbol;
|
||||
@@ -359,7 +363,6 @@ xf86rfbKeybInit(struct _InputDriverRec *drv,
|
||||
pInfo->control_proc = NULL;
|
||||
pInfo->switch_mode = NULL;
|
||||
pInfo->fd = -1;
|
||||
- pInfo->dev = NULL;
|
||||
|
||||
/* Collect the options, and process the common options. */
|
||||
xf86CollectInputOptions(pInfo, (const char**)drv->default_options);
|
||||
diff --git a/hw/vnc/rfbmouse.c b/hw/vnc/rfbmouse.c
|
||||
index 4657128..86e8f2f 100644
|
||||
--- a/hw/vnc/rfbmouse.c
|
||||
+++ b/hw/vnc/rfbmouse.c
|
||||
@@ -37,6 +37,7 @@
|
||||
#endif
|
||||
#include <xf86Xinput.h>
|
||||
#include <exevents.h> /* Needed for InitValuator/Proximity stuff */
|
||||
+#include <extinit.h>
|
||||
#include <mipointer.h>
|
||||
|
||||
#ifdef XFree86LOADER
|
||||
@@ -63,8 +64,12 @@ PtrDeviceOn(DeviceIntPtr pDev)
|
||||
}
|
||||
|
||||
void
|
||||
-PtrDeviceInit(void)
|
||||
+PtrDeviceInit(DeviceIntPtr pDevice, char *name)
|
||||
{
|
||||
+ Atom atom = MakeAtom(name, strlen(name), TRUE);
|
||||
+
|
||||
+ AssignTypeAndName(pDevice, atom, name);
|
||||
+
|
||||
}
|
||||
|
||||
void
|
||||
@@ -119,7 +124,7 @@ xf86rfbMouseControlProc(DeviceIntPtr dev, int onoff)
|
||||
{
|
||||
case DEVICE_INIT:
|
||||
vncSetPointerDevice(dev);
|
||||
- PtrDeviceInit();
|
||||
+ // PtrDeviceInit(dev, "rfbPointer");
|
||||
map[1] = 1;
|
||||
map[2] = 2;
|
||||
map[3] = 3;
|
||||
--
|
||||
1.7.3.4
|
||||
|
@ -1,11 +1,25 @@
|
||||
Index: xorg-server-1.6.3.901/hw/vnc/translate.c
|
||||
================================================================================
|
||||
--- xorg-server-1.7.99/hw/vnc/translate.c
|
||||
+++ xorg-server-1.7.99/hw/vnc/translate.c
|
||||
@@ -168,17 +168,17 @@
|
||||
From: Michael Schroeder <mls@suse.de>
|
||||
Date: Tue, 6 Sep 2011 07:58:33 +0200
|
||||
Subject: [PATCH 3/6] VNC: Fix crash when no depth translation is required.
|
||||
Patch-Mainline: Currently no upstream project.
|
||||
Git-commit: 74d5e3115cd955b7ee1acc64c6b8b42198ed894b
|
||||
Signed-off: Egbert Eich <eich@suse.de>
|
||||
References: bnc #389386
|
||||
|
||||
Signed-off-by: Egbert Eich <eich@freedesktop.org>
|
||||
|
||||
---
|
||||
hw/vnc/translate.c | 11 ++++++-----
|
||||
1 files changed, 6 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/hw/vnc/translate.c b/hw/vnc/translate.c
|
||||
index 5cc57a3..78030ed 100644
|
||||
--- a/hw/vnc/translate.c
|
||||
+++ b/hw/vnc/translate.c
|
||||
@@ -168,17 +168,18 @@ rfbTranslateNone(ScreenPtr pScreen, char *table, rfbPixelFormat *in, rfbPixelFor
|
||||
{
|
||||
VNCSCREENPTR(pScreen);
|
||||
DrawablePtr pDraw = (DrawablePtr)WindowTable[pScreen->myNum];
|
||||
DrawablePtr pDraw = (DrawablePtr)pScreen->root;
|
||||
- int truewidth = PixmapBytePad(width, in->bitsPerPixel) / 4;
|
||||
+ int truewidth = PixmapBytePad(width, in->bitsPerPixel);
|
||||
|
||||
@ -17,6 +31,7 @@ Index: xorg-server-1.6.3.901/hw/vnc/translate.c
|
||||
|
||||
- (*pScreen->GetImage)(pDraw, x, y, truewidth, height, ZPixmap, ~0, (char*)buf);
|
||||
+ (*pScreen->GetImage)(pDraw, x, y, width, height, ZPixmap, ~0, (char*)buf);
|
||||
+
|
||||
while (height--) {
|
||||
memcpy(optr, buf, width * in->bitsPerPixel / 8);
|
||||
optr += width * in->bitsPerPixel / 8;
|
||||
@ -25,3 +40,6 @@ Index: xorg-server-1.6.3.901/hw/vnc/translate.c
|
||||
}
|
||||
free(buffer);
|
||||
return;
|
||||
--
|
||||
1.7.3.4
|
||||
|
74
N-VNC-Readd-timeout-when-vnc-viewer-connection-breaks.patch
Normal file
74
N-VNC-Readd-timeout-when-vnc-viewer-connection-breaks.patch
Normal file
@ -0,0 +1,74 @@
|
||||
From: Egbert Eich <eich@freedesktop.org>
|
||||
Date: Tue, 6 Sep 2011 07:02:11 +0200
|
||||
Subject: [PATCH 2/6] VNC: Readd timeout when vnc viewer connection breaks.
|
||||
Patch-Mainline: Currently no upstream project.
|
||||
Git-commit: 759b49ed1c4ea03e45433c92c2fb8c44a60db34a
|
||||
Signed-off: Egbert Eich <eich@suse.de>
|
||||
References: bnc #441935, bnc #403901
|
||||
|
||||
This prevents Xvnc busy loop forever waiting for a viewer that no longer
|
||||
response due to network or other issues.
|
||||
|
||||
Signed-off-by: Egbert Eich <eich@freedesktop.org>
|
||||
---
|
||||
hw/vnc/sockets.c | 19 +++++--------------
|
||||
1 files changed, 5 insertions(+), 14 deletions(-)
|
||||
|
||||
diff --git a/hw/vnc/sockets.c b/hw/vnc/sockets.c
|
||||
index 39eb88a..ae43ed0 100644
|
||||
--- a/hw/vnc/sockets.c
|
||||
+++ b/hw/vnc/sockets.c
|
||||
@@ -442,9 +442,7 @@ WriteExact(int sock, char *buf, int len)
|
||||
int n;
|
||||
fd_set fds;
|
||||
struct timeval tv;
|
||||
-#if 0
|
||||
int totalTimeWaited = 0;
|
||||
-#endif
|
||||
|
||||
while (len > 0) {
|
||||
n = write(sock, buf, len);
|
||||
@@ -464,7 +462,6 @@ WriteExact(int sock, char *buf, int len)
|
||||
return n;
|
||||
}
|
||||
|
||||
-#if 0
|
||||
/* Retry every 5 seconds until we exceed rfbMaxClientWait. We
|
||||
need to do this because select doesn't necessarily return
|
||||
immediately when the other end has gone away */
|
||||
@@ -473,19 +470,14 @@ WriteExact(int sock, char *buf, int len)
|
||||
FD_SET(sock, &fds);
|
||||
tv.tv_sec = 5;
|
||||
tv.tv_usec = 0;
|
||||
-#else
|
||||
- /* We're in the WakeupHandler now, so don't wait */
|
||||
|
||||
- FD_ZERO(&fds);
|
||||
- FD_SET(sock, &fds);
|
||||
- tv.tv_sec = 0;
|
||||
- tv.tv_usec = 0;
|
||||
-#endif
|
||||
n = select(sock+1, NULL, &fds, NULL, &tv);
|
||||
-#if 0
|
||||
+
|
||||
if (n < 0) {
|
||||
- rfbLogPerror("WriteExact: select");
|
||||
- return n;
|
||||
+ if (errno != EINTR) {
|
||||
+ rfbLogPerror("WriteExact: select");
|
||||
+ return n;
|
||||
+ }
|
||||
}
|
||||
if (n == 0) {
|
||||
totalTimeWaited += 5000;
|
||||
@@ -496,7 +488,6 @@ WriteExact(int sock, char *buf, int len)
|
||||
} else {
|
||||
totalTimeWaited = 0;
|
||||
}
|
||||
-#endif
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
--
|
||||
1.7.3.4
|
||||
|
@ -1,34 +0,0 @@
|
||||
From a73c28f0bdafb1c5cb8129179188a99c0ca052e2 Mon Sep 17 00:00:00 2001
|
||||
From: Justin Dou <Justin.Dou@intel.com>
|
||||
Date: Thu, 10 Feb 2011 16:27:29 -0500
|
||||
Subject: [PATCH] Replace malloc with calloc to initialize the buffers[] as NULL in do_get_buffers function
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
The calling for allocate_or_reuse_buffer may fail due to some reason, e.g. out of memory.
|
||||
If the buffers[] were not initialized to be NULL, the following err_out may try to access an illegal memory, which will cause X crash afterward.
|
||||
|
||||
Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
|
||||
Signed-off-by: Justin Dou <Justin.Dou@intel.com>
|
||||
Signed-off-by: Keith Packard <keithp@keithp.com>
|
||||
---
|
||||
hw/xfree86/dri2/dri2.c | 2 +-
|
||||
1 files changed, 1 insertions(+), 1 deletions(-)
|
||||
|
||||
diff --git a/hw/xfree86/dri2/dri2.c b/hw/xfree86/dri2/dri2.c
|
||||
index 39996f9..9ca378f 100644
|
||||
--- a/hw/xfree86/dri2/dri2.c
|
||||
+++ b/hw/xfree86/dri2/dri2.c
|
||||
@@ -403,7 +403,7 @@ do_get_buffers(DrawablePtr pDraw, int *width, int *height,
|
||||
&& (pDraw->height == pPriv->height)
|
||||
&& (pPriv->serialNumber == DRI2DrawableSerial(pDraw));
|
||||
|
||||
- buffers = malloc((count + 1) * sizeof(buffers[0]));
|
||||
+ buffers = calloc((count + 1), sizeof(buffers[0]));
|
||||
|
||||
for (i = 0; i < count; i++) {
|
||||
const unsigned attachment = *(attachments++);
|
||||
--
|
||||
1.7.4.1
|
||||
|
@ -1,83 +0,0 @@
|
||||
From 6a433b67ca15fd1ea58334e607f867554f227451 Mon Sep 17 00:00:00 2001
|
||||
From: Adam Jackson <ajax@redhat.com>
|
||||
Date: Mon, 28 Mar 2011 16:30:09 +0000
|
||||
Subject: glx: Fix lifetime tracking for pixmaps
|
||||
|
||||
GLX pixmaps take a reference on the underlying pixmap; X and GLX pixmap
|
||||
IDs can be destroyed in either order with no error. Only windows need
|
||||
to be tracked under both XIDs.
|
||||
|
||||
Fixes piglit/glx-pixmap-life.
|
||||
|
||||
Reviewed-by: Michel Dänzer <michel@daenzer.net>
|
||||
Signed-off-by: Adam Jackson <ajax@redhat.com>
|
||||
---
|
||||
Index: xorg-server-1.9.3/glx/glxcmds.c
|
||||
===================================================================
|
||||
--- xorg-server-1.9.3.orig/glx/glxcmds.c
|
||||
+++ xorg-server-1.9.3/glx/glxcmds.c
|
||||
@@ -1132,10 +1132,11 @@ DoCreateGLXDrawable(ClientPtr client, __
|
||||
return BadAlloc;
|
||||
}
|
||||
|
||||
- /* Add the glx drawable under the XID of the underlying X drawable
|
||||
- * too. That way we'll get a callback in DrawableGone and can
|
||||
- * clean up properly when the drawable is destroyed. */
|
||||
- if (drawableId != glxDrawableId &&
|
||||
+ /*
|
||||
+ * Windows aren't refcounted, so track both the X and the GLX window
|
||||
+ * so we get called regardless of destruction order.
|
||||
+ */
|
||||
+ if (drawableId != glxDrawableId && type == GLX_DRAWABLE_WINDOW &&
|
||||
!AddResource(pDraw->id, __glXDrawableRes, pGlxDraw)) {
|
||||
pGlxDraw->destroy (pGlxDraw);
|
||||
return BadAlloc;
|
||||
@@ -1166,6 +1167,8 @@ DoCreateGLXPixmap(ClientPtr client, __GL
|
||||
err = DoCreateGLXDrawable(client, pGlxScreen, config, pDraw, drawableId,
|
||||
glxDrawableId, GLX_DRAWABLE_PIXMAP);
|
||||
|
||||
+ ((PixmapPtr)pDraw)->refcnt++;
|
||||
+
|
||||
return err;
|
||||
}
|
||||
|
||||
Index: xorg-server-1.9.3/glx/glxext.c
|
||||
===================================================================
|
||||
--- xorg-server-1.9.3.orig/glx/glxext.c
|
||||
+++ xorg-server-1.9.3/glx/glxext.c
|
||||
@@ -126,15 +126,15 @@ static Bool DrawableGone(__GLXdrawable *
|
||||
{
|
||||
__GLXcontext *c, *next;
|
||||
|
||||
- /* If this drawable was created using glx 1.3 drawable
|
||||
- * constructors, we added it as a glx drawable resource under both
|
||||
- * its glx drawable ID and it X drawable ID. Remove the other
|
||||
- * resource now so we don't a callback for freed memory. */
|
||||
- if (glxPriv->drawId != glxPriv->pDraw->id) {
|
||||
- if (xid == glxPriv->drawId)
|
||||
- FreeResourceByType(glxPriv->pDraw->id, __glXDrawableRes, TRUE);
|
||||
- else
|
||||
- FreeResourceByType(glxPriv->drawId, __glXDrawableRes, TRUE);
|
||||
+ if (glxPriv->type == GLX_DRAWABLE_WINDOW) {
|
||||
+ /* If this was created by glXCreateWindow, free the matching resource */
|
||||
+ if (glxPriv->drawId != glxPriv->pDraw->id) {
|
||||
+ if (xid == glxPriv->drawId)
|
||||
+ FreeResourceByType(glxPriv->pDraw->id, __glXDrawableRes, TRUE);
|
||||
+ else
|
||||
+ FreeResourceByType(glxPriv->drawId, __glXDrawableRes, TRUE);
|
||||
+ }
|
||||
+ /* otherwise this window was implicitly created by MakeCurrent */
|
||||
}
|
||||
|
||||
for (c = glxAllContexts; c; c = next) {
|
||||
@@ -170,6 +170,10 @@ static Bool DrawableGone(__GLXdrawable *
|
||||
__glXFreeContext(c);
|
||||
}
|
||||
|
||||
+ /* drop our reference to any backing pixmap */
|
||||
+ if (glxPriv->type == GLX_DRAWABLE_PIXMAP)
|
||||
+ glxPriv->pDraw->pScreen->DestroyPixmap((PixmapPtr)glxPriv->pDraw);
|
||||
+
|
||||
glxPriv->destroy(glxPriv);
|
||||
|
||||
return True;
|
20
Xvnc-pthread.diff
Normal file
20
Xvnc-pthread.diff
Normal file
@ -0,0 +1,20 @@
|
||||
--- xorg-server-1.10.4/hw/vnc/Makefile.am.orig 2011-09-06 15:25:27.000000000 +0000
|
||||
+++ xorg-server-1.10.4/hw/vnc/Makefile.am 2011-09-06 15:26:40.000000000 +0000
|
||||
@@ -37,6 +37,7 @@
|
||||
JPEG_LIBS = -ljpeg
|
||||
CRYPT_LIBS = -lcrypt
|
||||
Z_LIBS = -lz
|
||||
+PTHREAD_LIBS = -lpthread
|
||||
|
||||
AM_CFLAGS = $(DIX_CFLAGS) $(XVNC_CFLAGS) -I$(top_srcdir)/hw/dmx/vnc -DCHROMIUM=1
|
||||
|
||||
@@ -48,7 +49,8 @@
|
||||
$(CRYPT_LIBS) \
|
||||
$(XSERVER_SYS_LIBS) \
|
||||
$(VNCMODULES_LIBS) \
|
||||
- $(Z_LIBS)
|
||||
+ $(Z_LIBS) \
|
||||
+ $(PTHREAD_LIBS)
|
||||
|
||||
|
||||
relink:
|
@ -1,25 +1,11 @@
|
||||
Index: xorg-server-1.6.3.901/hw/xfree86/loader/dlloader.c
|
||||
================================================================================
|
||||
--- xorg-server-1.7.99/hw/xfree86/loader/dlloader.c
|
||||
+++ xorg-server-1.7.99/hw/xfree86/loader/dlloader.c
|
||||
@@ -120,7 +120,7 @@
|
||||
}
|
||||
--- xorg-server-1.7.99/hw/xfree86/loader/loader.c
|
||||
+++ xorg-server-1.7.99/hw/xfree86/loader/loader.c
|
||||
@@ -120,5 +120,5 @@
|
||||
|
||||
if (!global_scope)
|
||||
- global_scope = dlopen(NULL, DLOPEN_LAZY | DLOPEN_GLOBAL);
|
||||
+ global_scope = dlopen(NULL, DLOPEN_LAZY | DLOPEN_GLOBAL | RTLD_DEEPBIND);
|
||||
|
||||
if (global_scope)
|
||||
return DLFindSymbolLocal(global_scope, name);
|
||||
@@ -136,9 +136,9 @@
|
||||
int dlopen_flags;
|
||||
|
||||
if (flags & LD_FLAG_GLOBAL)
|
||||
- dlopen_flags = DLOPEN_LAZY | DLOPEN_GLOBAL;
|
||||
+ dlopen_flags = DLOPEN_LAZY | DLOPEN_GLOBAL | RTLD_DEEPBIND;
|
||||
else
|
||||
- dlopen_flags = DLOPEN_LAZY;
|
||||
+ dlopen_flags = DLOPEN_LAZY | RTLD_DEEPBIND;
|
||||
dlfile = dlopen(modrec->name, dlopen_flags);
|
||||
if (dlfile == NULL) {
|
||||
ErrorF("dlopen: %s\n", dlerror());
|
||||
|
@ -1,166 +0,0 @@
|
||||
commit 5c6a2f93ebc16a78093782b442306de23ae94e78
|
||||
Author: Chris Wilson <chris@chris-wilson.co.uk>
|
||||
Date: Mon Sep 27 19:39:23 2010 +0100
|
||||
|
||||
xfree86: Kill pixmapPrivate with a vengeance (v2)
|
||||
|
||||
ScrnInfo->pixmapPrivate only existed in order to catch invalid access to
|
||||
the framebuffer by making the backing data NULL across the VT switch.
|
||||
This was causing more confusion in the higher layers during mode setting
|
||||
without any real benefit, so remove it.
|
||||
|
||||
v2: Kill ShadowModifyPixmapHeader() as well.
|
||||
|
||||
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
||||
Cc: Julien Cristau <jcristau@debian.org>
|
||||
Cc: Andrew Guertin <lists@dolphinling.net>
|
||||
Reviewed-by: Keith Packard <keithp@keithp.com>
|
||||
Signed-off-by: Keith Packard <keithp@keithp.com>
|
||||
|
||||
diff --git a/hw/xfree86/common/xf86Helper.c b/hw/xfree86/common/xf86Helper.c
|
||||
index 90e0c67..97e5aec 100644
|
||||
--- a/hw/xfree86/common/xf86Helper.c
|
||||
+++ b/hw/xfree86/common/xf86Helper.c
|
||||
@@ -1180,10 +1180,6 @@ xf86EnableDisableFBAccess(int scrnIndex, Bool enable)
|
||||
if (enable)
|
||||
{
|
||||
/*
|
||||
- * Restore the screen pixmap devPrivate field
|
||||
- */
|
||||
- pspix->devPrivate = pScrnInfo->pixmapPrivate;
|
||||
- /*
|
||||
* Restore all of the clip lists on the screen
|
||||
*/
|
||||
if (!xf86Resetting)
|
||||
@@ -1196,13 +1192,6 @@ xf86EnableDisableFBAccess(int scrnIndex, Bool enable)
|
||||
* Empty all of the clip lists on the screen
|
||||
*/
|
||||
xf86SetRootClip (pScreen, FALSE);
|
||||
- /*
|
||||
- * save the screen pixmap devPrivate field and
|
||||
- * replace it with NULL so accidental references
|
||||
- * to the frame buffer are caught
|
||||
- */
|
||||
- pScrnInfo->pixmapPrivate = pspix->devPrivate;
|
||||
- pspix->devPrivate.ptr = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
diff --git a/hw/xfree86/common/xf86str.h b/hw/xfree86/common/xf86str.h
|
||||
index c9b261d..b979884 100644
|
||||
--- a/hw/xfree86/common/xf86str.h
|
||||
+++ b/hw/xfree86/common/xf86str.h
|
||||
@@ -765,7 +765,7 @@ typedef struct _ScrnInfoRec {
|
||||
|
||||
/* Allow screens to be enabled/disabled individually */
|
||||
Bool vtSema;
|
||||
- DevUnion pixmapPrivate; /* saved devPrivate from pixmap */
|
||||
+ DevUnion pixmapPrivate; /* XXX obsoleted; just for ABI compatibility */
|
||||
|
||||
/* hw cursor moves at SIGIO time */
|
||||
Bool silkenMouse;
|
||||
diff --git a/hw/xfree86/modes/xf86RandR12.c b/hw/xfree86/modes/xf86RandR12.c
|
||||
index 8a593a7..ba0862a 100644
|
||||
--- a/hw/xfree86/modes/xf86RandR12.c
|
||||
+++ b/hw/xfree86/modes/xf86RandR12.c
|
||||
@@ -511,7 +511,6 @@ xf86RandR12SetMode (ScreenPtr pScreen,
|
||||
WindowPtr pRoot = pScreen->root;
|
||||
DisplayModePtr currentMode = NULL;
|
||||
Bool ret = TRUE;
|
||||
- PixmapPtr pspix = NULL;
|
||||
|
||||
if (pRoot)
|
||||
(*scrp->EnableDisableFBAccess) (pScreen->myNum, FALSE);
|
||||
@@ -560,14 +559,6 @@ xf86RandR12SetMode (ScreenPtr pScreen,
|
||||
pScreen->mmHeight = oldmmHeight;
|
||||
scrp->currentMode = currentMode;
|
||||
}
|
||||
- /*
|
||||
- * Get the new Screen pixmap ptr as SwitchMode might have called
|
||||
- * ModifyPixmapHeader and xf86EnableDisableFBAccess will put it back...
|
||||
- * Unfortunately.
|
||||
- */
|
||||
- pspix = (*pScreen->GetScreenPixmap) (pScreen);
|
||||
- if (pspix->devPrivate.ptr)
|
||||
- scrp->pixmapPrivate = pspix->devPrivate;
|
||||
|
||||
/*
|
||||
* Make sure the layout is correct
|
||||
diff --git a/hw/xfree86/shadowfb/shadow.c b/hw/xfree86/shadowfb/shadow.c
|
||||
index 0af53d1..5cc476a 100644
|
||||
--- a/hw/xfree86/shadowfb/shadow.c
|
||||
+++ b/hw/xfree86/shadowfb/shadow.c
|
||||
@@ -36,15 +36,6 @@ static void ShadowCopyWindow(
|
||||
RegionPtr prgn
|
||||
);
|
||||
static Bool ShadowCreateGC(GCPtr pGC);
|
||||
-static Bool ShadowModifyPixmapHeader(
|
||||
- PixmapPtr pPixmap,
|
||||
- int width,
|
||||
- int height,
|
||||
- int depth,
|
||||
- int bitsPerPixel,
|
||||
- int devKind,
|
||||
- pointer pPixData
|
||||
-);
|
||||
|
||||
static Bool ShadowEnterVT(int index, int flags);
|
||||
static void ShadowLeaveVT(int index, int flags);
|
||||
@@ -189,7 +180,6 @@ ShadowFBInit2 (
|
||||
pScreen->CloseScreen = ShadowCloseScreen;
|
||||
pScreen->CopyWindow = ShadowCopyWindow;
|
||||
pScreen->CreateGC = ShadowCreateGC;
|
||||
- pScreen->ModifyPixmapHeader = ShadowModifyPixmapHeader;
|
||||
|
||||
pScrn->EnterVT = ShadowEnterVT;
|
||||
pScrn->LeaveVT = ShadowLeaveVT;
|
||||
@@ -310,49 +300,6 @@ ShadowCopyWindow(
|
||||
}
|
||||
}
|
||||
|
||||
-static Bool
|
||||
-ShadowModifyPixmapHeader(
|
||||
- PixmapPtr pPixmap,
|
||||
- int width,
|
||||
- int height,
|
||||
- int depth,
|
||||
- int bitsPerPixel,
|
||||
- int devKind,
|
||||
- pointer pPixData
|
||||
-)
|
||||
-{
|
||||
- ScreenPtr pScreen;
|
||||
- ScrnInfoPtr pScrn;
|
||||
- ShadowScreenPtr pPriv;
|
||||
- Bool retval;
|
||||
- PixmapPtr pScreenPix;
|
||||
-
|
||||
- if (!pPixmap)
|
||||
- return FALSE;
|
||||
-
|
||||
- pScreen = pPixmap->drawable.pScreen;
|
||||
- pScrn = xf86Screens[pScreen->myNum];
|
||||
-
|
||||
- pScreenPix = (*pScreen->GetScreenPixmap)(pScreen);
|
||||
-
|
||||
- if (pPixmap == pScreenPix && !pScrn->vtSema)
|
||||
- pScreenPix->devPrivate = pScrn->pixmapPrivate;
|
||||
-
|
||||
- pPriv = GET_SCREEN_PRIVATE(pScreen);
|
||||
-
|
||||
- pScreen->ModifyPixmapHeader = pPriv->ModifyPixmapHeader;
|
||||
- retval = (*pScreen->ModifyPixmapHeader)(pPixmap,
|
||||
- width, height, depth, bitsPerPixel, devKind, pPixData);
|
||||
- pScreen->ModifyPixmapHeader = ShadowModifyPixmapHeader;
|
||||
-
|
||||
- if (pPixmap == pScreenPix && !pScrn->vtSema)
|
||||
- {
|
||||
- pScrn->pixmapPrivate = pScreenPix->devPrivate;
|
||||
- pScreenPix->devPrivate.ptr = 0;
|
||||
- }
|
||||
- return retval;
|
||||
-}
|
||||
-
|
||||
static void
|
||||
ShadowComposite(
|
||||
CARD8 op,
|
@ -1,29 +0,0 @@
|
||||
From: Michel Dänzer <michel@daenzer.net>
|
||||
Subject: Pad size of system memory copy for 1x1 pixmaps
|
||||
References: bfo#32803 bnc#652523
|
||||
|
||||
Temporary description by: Jeff Mahoney <jeffm@suse.com>
|
||||
This patch fixes a crash that occured frequently with glibc malloc
|
||||
perturbing enabled and was a bit more random otherwise. The issue
|
||||
appears to be that the pExaPixmap for 1x1 pixmaps was allocating a single
|
||||
byte. The patch uses paddedWidth, which I expect is 4 bytes instead.
|
||||
|
||||
Acked-by: Jeff Mahoney <jeffm@suse.com>
|
||||
---
|
||||
|
||||
exa/exa_mixed.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/exa/exa_mixed.c b/exa/exa_mixed.c
|
||||
index ef20eb5..606f1e1 100644
|
||||
--- a/exa/exa_mixed.c
|
||||
+++ b/exa/exa_mixed.c
|
||||
@@ -98,7 +98,7 @@ exaCreatePixmap_mixed(ScreenPtr pScreen, int w, int h, int depth,
|
||||
pExaPixmap->use_gpu_copy = FALSE;
|
||||
|
||||
if (w == 1 && h == 1) {
|
||||
- pExaPixmap->sys_ptr = malloc((pPixmap->drawable.bitsPerPixel + 7) / 8);
|
||||
+ pExaPixmap->sys_ptr = malloc(paddedWidth);
|
||||
|
||||
/* Set up damage tracking */
|
||||
pExaPixmap->pDamage = DamageCreate(exaDamageReport_mixed, NULL,
|
@ -1,70 +0,0 @@
|
||||
From 0801afbd7c2c644c672b37f8463f1a0cbadebd2e Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Erkki=20Sepp=C3=A4l=C3=A4?= <erkki.seppala@vincit.fi>
|
||||
Date: Thu, 10 Feb 2011 15:35:14 +0200
|
||||
Subject: [PATCH] record: avoid crash when calling RecordFlushReplyBuffer recursively
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
RecordFlushReplyBuffer can call itself recursively through
|
||||
WriteClient->CallCallbacks->_CallCallbacks->RecordFlushAllContexts
|
||||
when the recording client's buffer cannot be completely emptied in one
|
||||
WriteClient. When a such a recursion occurs, it will not be broken out
|
||||
of which results in segmentation fault when the stack is exhausted.
|
||||
|
||||
This patch adds a counter (a flag, really) that guards against this
|
||||
situation, to break out of the recursion.
|
||||
|
||||
One alternative to this change would be to change _CallCallbacks to
|
||||
check the corresponding counter before the callback loop, but that
|
||||
might affect existing behavior, which may be relied upon.
|
||||
|
||||
Reviewed-by: Rami Ylimäki <rami.ylimaki@vincit.fi>
|
||||
Signed-off-by: Erkki Seppälä <erkki.seppala@vincit.fi>
|
||||
Signed-off-by: Keith Packard <keithp@keithp.com>
|
||||
---
|
||||
record/record.c | 6 +++++-
|
||||
1 files changed, 5 insertions(+), 1 deletions(-)
|
||||
|
||||
diff --git a/record/record.c b/record/record.c
|
||||
index 6a93d7a..facaebb 100644
|
||||
--- a/record/record.c
|
||||
+++ b/record/record.c
|
||||
@@ -77,6 +77,7 @@ typedef struct {
|
||||
char bufCategory; /* category of protocol in replyBuffer */
|
||||
int numBufBytes; /* number of bytes in replyBuffer */
|
||||
char replyBuffer[REPLY_BUF_SIZE]; /* buffered recorded protocol */
|
||||
+ int inFlush; /* are we inside RecordFlushReplyBuffer */
|
||||
} RecordContextRec, *RecordContextPtr;
|
||||
|
||||
/* RecordMinorOpRec - to hold minor opcode selections for extension requests
|
||||
@@ -245,8 +246,9 @@ RecordFlushReplyBuffer(
|
||||
int len2
|
||||
)
|
||||
{
|
||||
- if (!pContext->pRecordingClient || pContext->pRecordingClient->clientGone)
|
||||
+ if (!pContext->pRecordingClient || pContext->pRecordingClient->clientGone || pContext->inFlush)
|
||||
return;
|
||||
+ ++pContext->inFlush;
|
||||
if (pContext->numBufBytes)
|
||||
WriteToClient(pContext->pRecordingClient, pContext->numBufBytes,
|
||||
(char *)pContext->replyBuffer);
|
||||
@@ -255,6 +257,7 @@ RecordFlushReplyBuffer(
|
||||
WriteToClient(pContext->pRecordingClient, len1, (char *)data1);
|
||||
if (len2)
|
||||
WriteToClient(pContext->pRecordingClient, len2, (char *)data2);
|
||||
+ --pContext->inFlush;
|
||||
} /* RecordFlushReplyBuffer */
|
||||
|
||||
|
||||
@@ -1938,6 +1941,7 @@ ProcRecordCreateContext(ClientPtr client)
|
||||
pContext->numBufBytes = 0;
|
||||
pContext->pBufClient = NULL;
|
||||
pContext->continuedReply = 0;
|
||||
+ pContext->inFlush = 0;
|
||||
|
||||
err = RecordRegisterClients(pContext, client,
|
||||
(xRecordRegisterClientsReq *)stuff);
|
||||
--
|
||||
1.7.4.1
|
||||
|
@ -1,18 +0,0 @@
|
||||
Author: Stefan Dirsch <sndirsch@suse.de>
|
||||
Subject: Xvnc needs to add "-lz" itself
|
||||
Signed-off-by: Stefan Dirsch <sndirsch@suse.de>
|
||||
|
||||
Xvnc no longer can rely on the toolchain to add the required libs,
|
||||
it uses directly.
|
||||
|
||||
--- hw/vnc/Makefile.am.orig 2011-08-29 16:11:02.000000000 +0000
|
||||
+++ hw/vnc/Makefile.am 2011-08-29 16:11:16.000000000 +0000
|
||||
@@ -47,7 +47,7 @@ Xvnc_LDADD = \
|
||||
$(JPEG_LIBS) \
|
||||
$(CRYPT_LIBS) \
|
||||
$(XSERVER_SYS_LIBS) \
|
||||
- $(VNCMODULES_LIBS)
|
||||
+ $(VNCMODULES_LIBS) -lz
|
||||
|
||||
|
||||
relink:
|
3
xorg-server-1.10.4.tar.bz2
Normal file
3
xorg-server-1.10.4.tar.bz2
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:fafc16b97b9a61b62dfaa74e8d336baa0cea752ce9ed8103c4d212baa8031ca5
|
||||
size 5386174
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:864831f51e841ff37f2445d1c85b86b559c8860a435fb496aead4f256a2b141d
|
||||
size 5287061
|
@ -1,34 +0,0 @@
|
||||
From a6b9e8f1e5d5d0b3b0f121a6f677eeca7aab1950 Mon Sep 17 00:00:00 2001
|
||||
From: Adam Jackson <ajax@redhat.com>
|
||||
Date: Wed, 25 Aug 2010 15:06:38 +0000
|
||||
Subject: linux: Fix CPU usage bug in console fd flushing
|
||||
|
||||
If the vt gets a vhangup from under us, then the tty will appear ready
|
||||
in select(), but trying to tcflush() it will return -EIO, so we'll spin
|
||||
around at 100% CPU for no reason. Notice this condition and unregister
|
||||
the handler if it happens.
|
||||
|
||||
Signed-off-by: Adam Jackson <ajax@redhat.com>
|
||||
Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net>
|
||||
Reviewed-by: Julien Cristau <jcristau@debian.org>
|
||||
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
||||
---
|
||||
diff --git a/hw/xfree86/os-support/linux/lnx_init.c b/hw/xfree86/os-support/linux/lnx_init.c
|
||||
index bf61ceb..7ee9046 100644
|
||||
--- a/hw/xfree86/os-support/linux/lnx_init.c
|
||||
+++ b/hw/xfree86/os-support/linux/lnx_init.c
|
||||
@@ -85,7 +85,11 @@ static void *console_handler;
|
||||
static void
|
||||
drain_console(int fd, void *closure)
|
||||
{
|
||||
- tcflush(fd, TCIOFLUSH);
|
||||
+ errno = 0;
|
||||
+ if (tcflush(fd, TCIOFLUSH) == -1 && errno == EIO) {
|
||||
+ xf86RemoveGeneralHandler(console_handler);
|
||||
+ console_handler = NULL;
|
||||
+ }
|
||||
}
|
||||
|
||||
void
|
||||
--
|
||||
cgit v0.8.3-6-g21f6
|
@ -1,28 +0,0 @@
|
||||
Index: hw/xfree86/vnc/vncInit.c
|
||||
================================================================================
|
||||
--- hw/xfree86/vnc/vncInit.c
|
||||
+++ hw/xfree86/vnc/vncInit.c
|
||||
@@ -573,8 +573,8 @@
|
||||
#if 0
|
||||
ABI_EXTENSION_VERSION,
|
||||
#else
|
||||
- /* Hack to allow module to work with more servers (vs. 0.3 above) */
|
||||
- SET_ABI_VERSION(0, 2),
|
||||
+ /* Hack to allow module to work with more servers */
|
||||
+ SET_ABI_VERSION(1, 0),
|
||||
#endif
|
||||
MOD_CLASS_EXTENSION,
|
||||
{0,0,0,0}
|
||||
--- xcliplist/cliplistmod.c
|
||||
+++ xcliplist/cliplistmod.c
|
||||
@@ -26,8 +26,8 @@
|
||||
#if 0
|
||||
ABI_EXTENSION_VERSION,
|
||||
#else
|
||||
- /* Hack to allow module to work with more servers (vs. 0.3 above) */
|
||||
- SET_ABI_VERSION(0, 2),
|
||||
+ /* Hack to allow module to work with more servers */
|
||||
+ SET_ABI_VERSION(1, 0),
|
||||
#endif
|
||||
MOD_CLASS_EXTENSION,
|
||||
{0,0,0,0}
|
@ -1,31 +0,0 @@
|
||||
Index: xorg-server-1.6.3.901/hw/vnc/sockets.c
|
||||
================================================================================
|
||||
--- xorg-server-1.7.99/hw/vnc/sockets.c
|
||||
+++ xorg-server-1.7.99/hw/vnc/sockets.c
|
||||
@@ -448,7 +448,7 @@
|
||||
int n;
|
||||
fd_set fds;
|
||||
struct timeval tv;
|
||||
-#if 0
|
||||
+#if 1
|
||||
int totalTimeWaited = 0;
|
||||
#endif
|
||||
|
||||
@@ -470,7 +470,7 @@
|
||||
return n;
|
||||
}
|
||||
|
||||
-#if 0
|
||||
+#if 1
|
||||
/* Retry every 5 seconds until we exceed rfbMaxClientWait. We
|
||||
need to do this because select doesn't necessarily return
|
||||
immediately when the other end has gone away */
|
||||
@@ -488,7 +488,7 @@
|
||||
tv.tv_usec = 0;
|
||||
#endif
|
||||
n = select(sock+1, NULL, &fds, NULL, &tv);
|
||||
-#if 0
|
||||
+#if 1
|
||||
if (n < 0) {
|
||||
rfbLogPerror("WriteExact: select");
|
||||
return n;
|
@ -1,17 +0,0 @@
|
||||
Index: xorg-server-1.6.3.901/hw/vnc/sockets.c
|
||||
================================================================================
|
||||
--- xorg-server-1.7.99/hw/vnc/sockets.c
|
||||
+++ xorg-server-1.7.99/hw/vnc/sockets.c
|
||||
@@ -490,8 +490,10 @@
|
||||
n = select(sock+1, NULL, &fds, NULL, &tv);
|
||||
#if 1
|
||||
if (n < 0) {
|
||||
- rfbLogPerror("WriteExact: select");
|
||||
- return n;
|
||||
+ if (errno != EINTR) {
|
||||
+ rfbLogPerror("WriteExact: select");
|
||||
+ return n;
|
||||
+ }
|
||||
}
|
||||
if (n == 0) {
|
||||
totalTimeWaited += 5000;
|
@ -1,13 +0,0 @@
|
||||
Index: hw/vnc/cutpaste.c
|
||||
================================================================================
|
||||
--- hw/vnc/cutpaste.c
|
||||
+++ hw/vnc/cutpaste.c
|
||||
@@ -58,7 +58,7 @@
|
||||
8, PropModeReplace, len,
|
||||
(pointer)str, TRUE);
|
||||
|
||||
- if (dixLookupSelection(&pSel, XA_PRIMARY, serverClient, DixSetAttrAccess)) {
|
||||
+ if (dixLookupSelection(&pSel, XA_PRIMARY, serverClient, DixSetAttrAccess) == Success) {
|
||||
xEvent event;
|
||||
|
||||
if (pSel->client) {
|
@ -1,44 +0,0 @@
|
||||
Index: hw/dmx/Makefile.am
|
||||
================================================================================
|
||||
--- hw/dmx/Makefile.am
|
||||
+++ hw/dmx/Makefile.am
|
||||
@@ -1,6 +1,6 @@
|
||||
DIST_SUBDIRS = input vnc config glxProxy examples doc
|
||||
|
||||
-SUBDIRS = input vnc config examples
|
||||
+SUBDIRS = input config examples
|
||||
bin_PROGRAMS = Xdmx
|
||||
|
||||
if XINERAMA
|
||||
--- hw/dmx/dmx-config.h
|
||||
+++ hw/dmx/dmx-config.h
|
||||
@@ -72,7 +72,7 @@
|
||||
/* Enable the DMX extension */
|
||||
#define DMXEXT
|
||||
|
||||
-/* Enable VNC ability */
|
||||
-#define DMXVNC 1
|
||||
+/* Disable VNC ability */
|
||||
+#undef DMXVNC
|
||||
|
||||
#endif /* DMX_CONFIG_H */
|
||||
--- hw/dmx/input/Makefile.am
|
||||
+++ hw/dmx/input/Makefile.am
|
||||
@@ -61,7 +61,6 @@
|
||||
AM_CFLAGS = $(DIX_CFLAGS) \
|
||||
-I$(top_srcdir)/hw/dmx \
|
||||
-DHAVE_DMX_CONFIG_H \
|
||||
- -DDMXVNC=1 \
|
||||
$(GLX_DEFS) \
|
||||
@DMXMODULES_CFLAGS@
|
||||
|
||||
--- hw/dmx/vnc/Makefile.am
|
||||
+++ hw/dmx/vnc/Makefile.am
|
||||
@@ -37,7 +37,6 @@
|
||||
-I$(top_srcdir)/hw/xfree86/common \
|
||||
-DHAVE_DMX_CONFIG_H \
|
||||
$(DIX_CFLAGS) \
|
||||
- -DDMXVNC=1 \
|
||||
@DMXMODULES_CFLAGS@
|
||||
|
||||
###EXTRA_DIST = dmxdetach.c
|
@ -1,722 +0,0 @@
|
||||
Index: xorg-server-1.6.3.901/hw/vnc/cursor.c
|
||||
================================================================================
|
||||
--- xorg-server-1.7.99/configure.ac
|
||||
+++ xorg-server-1.7.99/configure.ac
|
||||
@@ -1504,7 +1504,7 @@
|
||||
XVNC_CFLAGS="-DVNCSERVER -DHAVE_XVNC_CONFIG_H"
|
||||
AC_SUBST([XVNC_CFLAGS])
|
||||
VNC_INCLUDES="$XEXT_INC $RENDER_INC $XTRAP_INC $RECORD_INC"
|
||||
- XVNC_LIBS="$CONFIG_LIB $XSERVER_LIBS $FB_LIB $MI_LIB $FIXES_LIB $XEXT_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $GLX_LIBS $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $XPSTUBS_LIB $CWRAP_LIB $OS_LIB $LIBS"
|
||||
+ XVNC_LIBS="$XEXT_LIB $MAIN_LIB $CONFIG_LIB $XSERVER_LIBS $FB_LIB $MI_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $GLX_LIBS $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $XPSTUBS_LIB $CWRAP_LIB $OS_LIB $FIXES_LIB $LIBS"
|
||||
AC_SUBST([XVNC_LIBS])
|
||||
|
||||
if test "x$GLX" = xyes; then
|
||||
--- xorg-server-1.7.99/hw/vnc/cursor.c
|
||||
+++ xorg-server-1.7.99/hw/vnc/cursor.c
|
||||
@@ -33,6 +33,7 @@
|
||||
#include "sprite.h"
|
||||
#include "cursorstr.h"
|
||||
#include "servermd.h"
|
||||
+#include "inputstr.h"
|
||||
|
||||
|
||||
/* Copied from Xvnc/lib/font/util/utilbitmap.c */
|
||||
@@ -262,7 +263,7 @@
|
||||
|
||||
#if XFREE86VNC
|
||||
if (pScreen == pCursorScreen)
|
||||
- miPointerPosition(&x, &y);
|
||||
+ miPointerGetPosition(inputInfo.pointer, &x, &y);
|
||||
#else
|
||||
rfbSpriteGetCursorPos(pScreen, &x, &y);
|
||||
#endif
|
||||
--- xorg-server-1.7.99/hw/vnc/cutpaste.c
|
||||
+++ xorg-server-1.7.99/hw/vnc/cutpaste.c
|
||||
@@ -66,7 +66,7 @@
|
||||
event.u.selectionClear.time = GetTimeInMillis();
|
||||
event.u.selectionClear.window = pSel->window;
|
||||
event.u.selectionClear.atom = pSel->selection;
|
||||
- (void) TryClientEvents (pSel->client, &event, 1,
|
||||
+ (void) TryClientEvents (pSel->client, NULL, &event, 1,
|
||||
NoEventMask, NoEventMask /* CantBeFiltered */,
|
||||
NullGrab);
|
||||
}
|
||||
--- xorg-server-1.7.99/hw/vnc/dispcur.c
|
||||
+++ xorg-server-1.7.99/hw/vnc/dispcur.c
|
||||
@@ -74,7 +74,10 @@
|
||||
|
||||
/* per-screen private data */
|
||||
|
||||
-static DevPrivateKey rfbDCScreenKey = &rfbDCScreenKey;
|
||||
+static int rfbDCScreenKeyStore;
|
||||
+static DevPrivateKey rfbDCScreenKey = &rfbDCScreenKeyStore;
|
||||
+static int rfbScreenKeyStore;
|
||||
+static DevPrivateKey rfbScreenKey = &rfbScreenKeyStore;
|
||||
|
||||
static Bool rfbDCCloseScreen(int index, ScreenPtr pScreen);
|
||||
|
||||
@@ -205,7 +208,7 @@
|
||||
CursorPtr pCursor;
|
||||
{
|
||||
if (pCursor->bits->refcnt <= 1)
|
||||
- dixSetPrivate(&pCursor->bits->devPrivates, pScreen, NULL);
|
||||
+ dixSetPrivate(&pCursor->bits->devPrivates, rfbScreenKey, NULL);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -303,7 +306,7 @@
|
||||
xfree ((pointer) pPriv);
|
||||
return (rfbDCCursorPtr)NULL;
|
||||
}
|
||||
- dixSetPrivate(&pCursor->bits->devPrivates, pScreen, pPriv);
|
||||
+ dixSetPrivate(&pCursor->bits->devPrivates, rfbScreenKey, pPriv);
|
||||
return pPriv;
|
||||
}
|
||||
pPriv->pPicture = 0;
|
||||
@@ -321,7 +324,7 @@
|
||||
xfree ((pointer) pPriv);
|
||||
return (rfbDCCursorPtr)NULL;
|
||||
}
|
||||
- dixSetPrivate(&pCursor->bits->devPrivates, pScreen, pPriv);
|
||||
+ dixSetPrivate(&pCursor->bits->devPrivates, rfbScreenKey, pPriv);
|
||||
|
||||
/* create the two sets of bits, clipping as appropriate */
|
||||
|
||||
@@ -368,7 +371,7 @@
|
||||
rfbDCCursorPtr pPriv;
|
||||
|
||||
pPriv = (rfbDCCursorPtr)dixLookupPrivate(&pCursor->bits->devPrivates,
|
||||
- pScreen);
|
||||
+ rfbScreenKey);
|
||||
if (pPriv && (pCursor->bits->refcnt <= 1))
|
||||
{
|
||||
if (pPriv->sourceBits)
|
||||
@@ -380,7 +383,7 @@
|
||||
FreePicture (pPriv->pPicture, 0);
|
||||
#endif
|
||||
xfree ((pointer) pPriv);
|
||||
- dixSetPrivate(&pCursor->bits->devPrivates, pScreen, NULL);
|
||||
+ dixSetPrivate(&pCursor->bits->devPrivates, rfbScreenKey, NULL);
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
@@ -439,7 +442,7 @@
|
||||
WindowPtr pWin;
|
||||
|
||||
pPriv = (rfbDCCursorPtr)dixLookupPrivate(&pCursor->bits->devPrivates,
|
||||
- pScreen);
|
||||
+ rfbScreenKey);
|
||||
if (!pPriv)
|
||||
{
|
||||
pPriv = rfbDCRealize(pScreen, pCursor);
|
||||
@@ -690,7 +693,7 @@
|
||||
PixmapPtr pTemp;
|
||||
|
||||
pPriv = (rfbDCCursorPtr)dixLookupPrivate(&pCursor->bits->devPrivates,
|
||||
- pScreen);
|
||||
+ rfbScreenKey);
|
||||
if (!pPriv)
|
||||
{
|
||||
pPriv = rfbDCRealize(pScreen, pCursor);
|
||||
--- xorg-server-1.7.99/hw/vnc/init.c
|
||||
+++ xorg-server-1.7.99/hw/vnc/init.c
|
||||
@@ -90,6 +90,7 @@
|
||||
#include "dix.h"
|
||||
#include "micmap.h"
|
||||
#include "rfb.h"
|
||||
+#include "xserver-properties.h"
|
||||
|
||||
#ifdef CORBA
|
||||
#include <vncserverctrl.h>
|
||||
@@ -138,7 +139,7 @@
|
||||
|
||||
|
||||
static void
|
||||
-PointerWarpCursor(ScreenPtr pScreen, int x, int y)
|
||||
+PointerWarpCursor(DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y)
|
||||
{
|
||||
#if 0
|
||||
DeviceIntPtr pDev = NULL;
|
||||
@@ -775,8 +776,8 @@
|
||||
char *argv[];
|
||||
{
|
||||
DeviceIntPtr p, k;
|
||||
- k = AddInputDevice(rfbKeybdProc, TRUE);
|
||||
- p = AddInputDevice(rfbMouseProc, TRUE);
|
||||
+ k = AddInputDevice(serverClient, rfbKeybdProc, TRUE);
|
||||
+ p = AddInputDevice(serverClient, rfbMouseProc, TRUE);
|
||||
RegisterKeyboardDevice(k);
|
||||
RegisterPointerDevice(p);
|
||||
|
||||
@@ -804,7 +805,7 @@
|
||||
case DEVICE_INIT:
|
||||
vncSetKeyboardDevice(pDevice);
|
||||
KbdDeviceInit(pDevice, &keySyms, modMap);
|
||||
- InitKeyboardDeviceStruct(pDev, &keySyms, modMap,
|
||||
+ InitKeyboardDeviceStruct(pDevice, NULL,
|
||||
(BellProcPtr)rfbSendBell,
|
||||
(KbdCtrlProcPtr)NoopDDA);
|
||||
break;
|
||||
@@ -831,6 +832,8 @@
|
||||
int onoff;
|
||||
{
|
||||
BYTE map[6];
|
||||
+ Atom btn_labels[5] = {0};
|
||||
+ Atom axes_labels[2] = {0};
|
||||
DevicePtr pDev = (DevicePtr)pDevice;
|
||||
|
||||
switch (onoff)
|
||||
@@ -842,10 +845,16 @@
|
||||
map[3] = 3;
|
||||
map[4] = 4;
|
||||
map[5] = 5;
|
||||
- InitPointerDeviceStruct(pDev, map, 5,
|
||||
- GetMotionHistory,
|
||||
+ btn_labels[0] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_LEFT);
|
||||
+ btn_labels[1] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_MIDDLE);
|
||||
+ btn_labels[2] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_RIGHT);
|
||||
+
|
||||
+ axes_labels[0] = XIGetKnownProperty(AXIS_LABEL_PROP_REL_X);
|
||||
+ axes_labels[1] = XIGetKnownProperty(AXIS_LABEL_PROP_REL_Y);
|
||||
+
|
||||
+ InitPointerDeviceStruct(pDev, map, 5, btn_labels,
|
||||
PtrDeviceControl,
|
||||
- GetMaximumEventsNum(), 2 /* numAxes */);
|
||||
+ GetMaximumEventsNum(), 2 /* numAxes */, axes_labels);
|
||||
vncSetPointerDevice(pDevice);
|
||||
break;
|
||||
|
||||
--- xorg-server-1.7.99/hw/vnc/kbdptr.c
|
||||
+++ xorg-server-1.7.99/hw/vnc/kbdptr.c
|
||||
@@ -39,6 +39,7 @@
|
||||
#include "mi.h"
|
||||
#include "mipointer.h"
|
||||
#include "keyboard.h"
|
||||
+#include "xkbsrv.h"
|
||||
|
||||
#ifdef DMXVNC
|
||||
#include "dmxinput.h"
|
||||
@@ -69,15 +70,16 @@
|
||||
ptrDevice = ptr;
|
||||
}
|
||||
|
||||
-
|
||||
#ifndef DMXVNC
|
||||
static void
|
||||
EnqueueMotion(DeviceIntPtr ptrDev, int x, int y)
|
||||
{
|
||||
- xEvent *events = (xEvent*) calloc(sizeof(xEvent), GetMaximumEventsNum());
|
||||
int detail = 0, valuators[2], nevents, i;
|
||||
+ EventListPtr events;
|
||||
valuators[0] = x;
|
||||
valuators[1] = y;
|
||||
+ GetEventList(&events);
|
||||
+
|
||||
if (!ptrDev) {
|
||||
ErrorF("VNC: In EnqueueMotion() ptrDev=NULL\n");
|
||||
return;
|
||||
@@ -85,8 +87,7 @@
|
||||
nevents = GetPointerEvents(events, ptrDev, MotionNotify, detail,
|
||||
POINTER_ABSOLUTE, 0, 2, valuators);
|
||||
for (i = 0; i < nevents; i++)
|
||||
- mieqEnqueue(ptrDev, events + i);
|
||||
- free(events);
|
||||
+ mieqEnqueue(ptrDev, (InternalEvent*)(events + i)->event);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -94,8 +95,10 @@
|
||||
static void
|
||||
EnqueueButton(DeviceIntPtr ptrDev, int type, int detail)
|
||||
{
|
||||
- xEvent *events = (xEvent*) calloc(sizeof(xEvent), GetMaximumEventsNum());
|
||||
int nevents, i;
|
||||
+ EventListPtr events;
|
||||
+ GetEventList(&events);
|
||||
+
|
||||
if (!ptrDev) {
|
||||
ErrorF("VNC: In EnqueueButton() ptrDev=NULL\n");
|
||||
return;
|
||||
@@ -103,27 +106,26 @@
|
||||
nevents = GetPointerEvents(events, ptrDev, type, detail,
|
||||
POINTER_ABSOLUTE, 0, 0, NULL/*valuators*/);
|
||||
for (i = 0; i < nevents; i++)
|
||||
- mieqEnqueue(ptrDev, events + i);
|
||||
- free(events);
|
||||
+ mieqEnqueue(ptrDev, (InternalEvent*)(events + i)->event);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
EnqueueKey(DeviceIntPtr kbdDev, int type, int detail)
|
||||
{
|
||||
- xEvent *events = (xEvent*) calloc(sizeof(xEvent), GetMaximumEventsNum());
|
||||
int nevents, i;
|
||||
+ EventListPtr events;
|
||||
+ GetEventList(&events);
|
||||
+
|
||||
if (!kbdDev) {
|
||||
ErrorF("VNC: In EnqueueKey() kbdDev=NULL\n");
|
||||
return;
|
||||
}
|
||||
nevents = GetKeyboardEvents(events, kbdDev, type, detail);
|
||||
for (i = 0; i < nevents; i++)
|
||||
- mieqEnqueue(kbdDev, events + i);
|
||||
- free(events);
|
||||
+ mieqEnqueue(kbdDev, (InternalEvent*)(events + i)->event);
|
||||
}
|
||||
|
||||
-
|
||||
/*
|
||||
* Called when the rfbserver receives a rfbKeyEvent event from a client.
|
||||
* Put an X keyboard event into the event queue.
|
||||
@@ -133,6 +135,7 @@
|
||||
{
|
||||
const int type = down ? KeyPress : KeyRelease;
|
||||
KeySymsPtr keySyms;
|
||||
+ XkbStateRec *xkb;
|
||||
int i;
|
||||
int keyCode = 0;
|
||||
int freeIndex = -1;
|
||||
@@ -145,7 +148,7 @@
|
||||
if (!kbdDevice)
|
||||
return;
|
||||
|
||||
- keySyms = &kbdDevice->key->curKeySyms;
|
||||
+ keySyms = XkbGetCoreMap(kbdDevice);
|
||||
|
||||
#ifdef CORBA
|
||||
if (cl) {
|
||||
@@ -256,18 +259,19 @@
|
||||
shiftMustBePressed = TRUE;
|
||||
}
|
||||
|
||||
- SendMappingNotify(MappingKeyboard, keyCode, 1, serverClient);
|
||||
+ XkbApplyMappingChange(kbdDevice, keySyms, keyCode, 1, NULL, serverClient);
|
||||
|
||||
ErrorF("KbdAddEvent: unknown KeySym 0x%x - allocating KeyCode %d\n",
|
||||
(int)keySym, keyCode);
|
||||
}
|
||||
|
||||
+ xkb = &kbdDevice->key->xkbInfo->state;
|
||||
if (down) {
|
||||
- if (shiftMustBePressed && !(kbdDevice->key->state & ShiftMask)) {
|
||||
+ if (shiftMustBePressed && !(XkbStateFieldFromRec(xkb) & ShiftMask)) {
|
||||
fakeShiftPress = TRUE;
|
||||
EnqueueKey(kbdDevice, KeyPress, SHIFT_L_KEY_CODE);
|
||||
}
|
||||
- if (shiftMustBeReleased && (kbdDevice->key->state & ShiftMask)) {
|
||||
+ if (shiftMustBeReleased && (XkbStateFieldFromRec(xkb) & ShiftMask)) {
|
||||
if (KEY_IS_PRESSED(SHIFT_L_KEY_CODE)) {
|
||||
fakeShiftLRelease = TRUE;
|
||||
EnqueueKey(kbdDevice, KeyRelease, SHIFT_L_KEY_CODE);
|
||||
--- xorg-server-1.7.99/hw/vnc/rdp.c
|
||||
+++ xorg-server-1.7.99/hw/vnc/rdp.c
|
||||
@@ -27,6 +27,7 @@
|
||||
#include <errno.h>
|
||||
#include <netinet/in.h>
|
||||
#include <netinet/tcp.h>
|
||||
+#include <arpa/inet.h>
|
||||
#include "rfb.h"
|
||||
|
||||
typedef struct rdpClientRec {
|
||||
--- xorg-server-1.7.99/hw/vnc/rfbkeyb.c
|
||||
+++ xorg-server-1.7.99/hw/vnc/rfbkeyb.c
|
||||
@@ -147,7 +147,7 @@
|
||||
#ifdef XKB
|
||||
if (noXkbExtension) {
|
||||
#endif
|
||||
- InitKeyboardDeviceStruct(pDev, &keySyms, modMap,
|
||||
+ InitKeyboardDeviceStruct(device, NULL,
|
||||
(BellProcPtr)rfbSendBell,
|
||||
(KbdCtrlProcPtr)NoopDDA);
|
||||
#ifdef XKB
|
||||
@@ -388,7 +388,7 @@
|
||||
"xf4vnc Project, see http://xf4vnc.sf.net",
|
||||
MODINFOSTRING1,
|
||||
MODINFOSTRING2,
|
||||
- XF86_VERSION_CURRENT,
|
||||
+ XORG_VERSION_CURRENT,
|
||||
1, 0, 0,
|
||||
ABI_CLASS_XINPUT,
|
||||
ABI_XINPUT_VERSION,
|
||||
--- xorg-server-1.7.99/hw/vnc/rfbmouse.c
|
||||
+++ xorg-server-1.7.99/hw/vnc/rfbmouse.c
|
||||
@@ -51,7 +51,7 @@
|
||||
#include <mipointer.h>
|
||||
#endif
|
||||
#include "rfb.h"
|
||||
-
|
||||
+#include "xserver-properties.h"
|
||||
|
||||
unsigned char ptrAcceleration = 50;
|
||||
|
||||
@@ -95,13 +95,18 @@
|
||||
{
|
||||
BYTE map[6];
|
||||
DevicePtr pDev = (DevicePtr)device;
|
||||
+ Atom btn_labels[5] = {0};
|
||||
+ Atom axes_labels[2] = {0};
|
||||
+
|
||||
void *func1;
|
||||
int (*func2)(void);
|
||||
|
||||
+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 3
|
||||
if (LoaderSymbol("GetMotionHistory"))
|
||||
func1 = LoaderSymbol("GetMotionHistory");
|
||||
else
|
||||
func1 = LoaderSymbol("miPointerGetMotionEvents");
|
||||
+#endif
|
||||
|
||||
if (LoaderSymbol("GetMotionHistorySize"))
|
||||
func2 = LoaderSymbol("GetMotionHistorySize");
|
||||
@@ -119,10 +124,21 @@
|
||||
map[3] = 3;
|
||||
map[4] = 4;
|
||||
map[5] = 5;
|
||||
- InitPointerDeviceStruct(pDev, map, 5,
|
||||
+ btn_labels[0] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_LEFT);
|
||||
+ btn_labels[1] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_MIDDLE);
|
||||
+ btn_labels[2] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_RIGHT);
|
||||
+ btn_labels[3] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_WHEEL_UP);
|
||||
+ btn_labels[4] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_WHEEL_DOWN);
|
||||
+
|
||||
+ axes_labels[0] = XIGetKnownProperty(AXIS_LABEL_PROP_REL_X);
|
||||
+ axes_labels[1] = XIGetKnownProperty(AXIS_LABEL_PROP_REL_Y);
|
||||
+
|
||||
+ InitPointerDeviceStruct(pDev, map, 5, btn_labels,
|
||||
+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 3
|
||||
func1,
|
||||
+#endif
|
||||
PtrDeviceControl,
|
||||
- (*func2)(), 2);
|
||||
+ (*func2)(), 2, axes_labels);
|
||||
break;
|
||||
|
||||
case DEVICE_ON:
|
||||
@@ -243,7 +259,7 @@
|
||||
"xf4vnc Project, see http://xf4vnc.sf.net",
|
||||
MODINFOSTRING1,
|
||||
MODINFOSTRING2,
|
||||
- XF86_VERSION_CURRENT,
|
||||
+ XORG_VERSION_CURRENT,
|
||||
1, 0, 0,
|
||||
ABI_CLASS_XINPUT,
|
||||
ABI_XINPUT_VERSION,
|
||||
--- xorg-server-1.7.99/hw/vnc/rfbserver.c
|
||||
+++ xorg-server-1.7.99/hw/vnc/rfbserver.c
|
||||
@@ -53,6 +53,7 @@
|
||||
#include "propertyst.h"
|
||||
#include <X11/Xatom.h>
|
||||
#include <mi.h>
|
||||
+#include <inputstr.h>
|
||||
|
||||
#ifdef CORBA
|
||||
#include <vncserverctrl.h>
|
||||
@@ -1122,8 +1123,8 @@
|
||||
|
||||
{
|
||||
int x, y;
|
||||
- miPointerPosition(&x, &y); /*XXX deprecated*/
|
||||
- (*pVNC->spriteFuncs->SetCursor)(cl->pScreen, pVNC->pCurs, x, y);
|
||||
+ miPointerGetPosition(inputInfo.pointer, &x, &y);
|
||||
+ (*pVNC->spriteFuncs->SetCursor)(inputInfo.pointer, cl->pScreen, pVNC->pCurs, x, y);
|
||||
}
|
||||
#endif
|
||||
|
||||
--- xorg-server-1.7.99/hw/vnc/sprite.c
|
||||
+++ xorg-server-1.7.99/hw/vnc/sprite.c
|
||||
@@ -112,7 +112,8 @@
|
||||
static RegionPtr rfbSpriteRestoreAreas(WindowPtr pWin, RegionPtr pRgnExposed);
|
||||
static void rfbSpriteComputeSaved(ScreenPtr pScreen);
|
||||
|
||||
-static DevPrivateKey rfbSpriteScreenKey = &rfbSpriteScreenKey;
|
||||
+static int rfbSpriteScreenKeyStore;
|
||||
+static DevPrivateKey rfbSpriteScreenKey = &rfbSpriteScreenKeyStore;
|
||||
|
||||
#define SCREEN_PROLOGUE(pScreen, field) ((pScreen)->field = \
|
||||
((rfbSpriteScreenPtr)dixLookupPrivate(&(pScreen)->devPrivates, \
|
||||
@@ -144,7 +145,8 @@
|
||||
rfbSpriteCopyClip,
|
||||
};
|
||||
|
||||
-static DevPrivateKey rfbSpriteGCKey = &rfbSpriteGCKey;
|
||||
+static int rfbSpriteGCKeyStore;
|
||||
+static DevPrivateKey rfbSpriteGCKey = &rfbSpriteGCKeyStore;
|
||||
|
||||
#define GC_FUNC_PROLOGUE(pGC) \
|
||||
rfbSpriteGCPtr pGCPriv = \
|
||||
@@ -289,23 +291,27 @@
|
||||
* pointer-sprite method table
|
||||
*/
|
||||
|
||||
-static Bool rfbSpriteRealizeCursor (ScreenPtr pScreen, CursorPtr pCursor);
|
||||
-static Bool rfbSpriteUnrealizeCursor (ScreenPtr pScreen, CursorPtr pCursor);
|
||||
-static void rfbSpriteSetCursor (ScreenPtr pScreen, CursorPtr pCursor, int x, int y);
|
||||
-static void rfbSpriteMoveCursor (ScreenPtr pScreen, int x, int y);
|
||||
+static Bool rfbSpriteRealizeCursor (DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor);
|
||||
+static Bool rfbSpriteUnrealizeCursor (DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor);
|
||||
+static void rfbSpriteSetCursor (DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor, int x, int y);
|
||||
+static void rfbSpriteMoveCursor (DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y);
|
||||
+static Bool rfbSpriteInitializeCursor (DeviceIntPtr pDev, ScreenPtr pScreen);
|
||||
+static void rfbSpriteCleanupCursor (DeviceIntPtr pDev, ScreenPtr pScreen);
|
||||
|
||||
miPointerSpriteFuncRec rfbSpritePointerFuncs = {
|
||||
rfbSpriteRealizeCursor,
|
||||
rfbSpriteUnrealizeCursor,
|
||||
rfbSpriteSetCursor,
|
||||
rfbSpriteMoveCursor,
|
||||
+ rfbSpriteInitializeCursor,
|
||||
+ rfbSpriteCleanupCursor,
|
||||
};
|
||||
|
||||
/*
|
||||
* other misc functions
|
||||
*/
|
||||
|
||||
-static Bool rfbDisplayCursor (ScreenPtr pScreen, CursorPtr pCursor);
|
||||
+static Bool rfbDisplayCursor (DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor);
|
||||
|
||||
|
||||
/*
|
||||
@@ -1963,7 +1969,7 @@
|
||||
#define SPRITE_PAD 8
|
||||
|
||||
static Bool
|
||||
-rfbSpriteRealizeCursor (ScreenPtr pScreen, CursorPtr pCursor)
|
||||
+rfbSpriteRealizeCursor (DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor)
|
||||
{
|
||||
rfbSpriteScreenPtr pScreenPriv;
|
||||
|
||||
@@ -1975,7 +1981,7 @@
|
||||
}
|
||||
|
||||
static Bool
|
||||
-rfbSpriteUnrealizeCursor (ScreenPtr pScreen, CursorPtr pCursor)
|
||||
+rfbSpriteUnrealizeCursor (DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor)
|
||||
{
|
||||
rfbSpriteScreenPtr pScreenPriv;
|
||||
|
||||
@@ -1985,7 +1991,7 @@
|
||||
}
|
||||
|
||||
static void
|
||||
-rfbSpriteSetCursor (ScreenPtr pScreen, CursorPtr pCursor, int x, int y)
|
||||
+rfbSpriteSetCursor (DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor, int x, int y)
|
||||
{
|
||||
rfbSpriteScreenPtr pScreenPriv;
|
||||
rfbClientPtr cl, nextCl;
|
||||
@@ -2101,13 +2107,24 @@
|
||||
}
|
||||
|
||||
static void
|
||||
-rfbSpriteMoveCursor (ScreenPtr pScreen, int x, int y)
|
||||
+rfbSpriteMoveCursor (DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y)
|
||||
{
|
||||
rfbSpriteScreenPtr pScreenPriv;
|
||||
|
||||
pScreenPriv = (rfbSpriteScreenPtr)dixLookupPrivate(&pScreen->devPrivates,
|
||||
rfbSpriteScreenKey);
|
||||
- rfbSpriteSetCursor (pScreen, pScreenPriv->pCursor, x, y);
|
||||
+ rfbSpriteSetCursor (pDev, pScreen, pScreenPriv->pCursor, x, y);
|
||||
+}
|
||||
+
|
||||
+static Bool
|
||||
+rfbSpriteInitializeCursor (DeviceIntPtr pDev, ScreenPtr pScreen)
|
||||
+{
|
||||
+ return TRUE;
|
||||
+}
|
||||
+
|
||||
+static void
|
||||
+rfbSpriteCleanupCursor (DeviceIntPtr pDev, ScreenPtr pScreen)
|
||||
+{
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -2215,9 +2232,7 @@
|
||||
*/
|
||||
|
||||
static Bool
|
||||
-rfbDisplayCursor(pScreen, pCursor)
|
||||
- ScreenPtr pScreen;
|
||||
- CursorPtr pCursor;
|
||||
+rfbDisplayCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor)
|
||||
{
|
||||
rfbClientPtr cl;
|
||||
rfbSpriteScreenPtr pPriv;
|
||||
@@ -2230,7 +2245,7 @@
|
||||
|
||||
pPriv = (rfbSpriteScreenPtr)dixLookupPrivate(&pScreen->devPrivates,
|
||||
rfbSpriteScreenKey);
|
||||
- status = (*pPriv->DisplayCursor)(pScreen, pCursor);
|
||||
+ status = (*pPriv->DisplayCursor)(pDev, pScreen, pCursor);
|
||||
|
||||
/* send new cursor shape to interested viewers */
|
||||
for (cl = rfbClientHead; cl ; cl = cl->next) {
|
||||
--- xorg-server-1.7.99/hw/vnc/vncext.c
|
||||
+++ xorg-server-1.7.99/hw/vnc/vncext.c
|
||||
@@ -36,8 +36,9 @@
|
||||
#include <arpa/inet.h>
|
||||
#include <netdb.h>
|
||||
|
||||
-DevPrivateKey vncCreateScreenResourcesKey = &vncCreateScreenResourcesKey;
|
||||
-DevPrivateKey rfbGCKey = &rfbGCKey;
|
||||
+static int vncCreateScreenResourcesKeyStore, rfbGCKeyStore;
|
||||
+DevPrivateKey vncCreateScreenResourcesKey = &vncCreateScreenResourcesKeyStore;
|
||||
+DevPrivateKey rfbGCKey = &rfbGCKeyStore;
|
||||
|
||||
int VncSelectNotify(ClientPtr client, BOOL onoff);
|
||||
void VncExtensionInit(void);
|
||||
@@ -514,7 +515,7 @@
|
||||
else
|
||||
conn.ipaddress = (CARD32)peer.sin_addr.s_addr;
|
||||
|
||||
- (void) TryClientEvents(pn->client, (xEventPtr)&conn, 1, NoEventMask,
|
||||
+ (void) TryClientEvents(pn->client, NULL, (xEventPtr)&conn, 1, NoEventMask,
|
||||
NoEventMask, NullGrab);
|
||||
}
|
||||
pn = pn->next;
|
||||
@@ -557,7 +558,7 @@
|
||||
else
|
||||
conn.ipaddress = (CARD32)peer.sin_addr.s_addr;
|
||||
|
||||
- (void) TryClientEvents(pn->client, (xEventPtr)&conn, 1, NoEventMask,
|
||||
+ (void) TryClientEvents(pn->client, NULL, (xEventPtr)&conn, 1, NoEventMask,
|
||||
NoEventMask, NullGrab);
|
||||
}
|
||||
pn = pn->next;
|
||||
@@ -586,7 +587,7 @@
|
||||
conn.type = VncEventBase + XVncDisconnected;
|
||||
conn.sequenceNumber = pn->client->sequence;
|
||||
conn.connected = sock;
|
||||
- (void) TryClientEvents(pn->client, (xEventPtr)&conn, 1, NoEventMask,
|
||||
+ (void) TryClientEvents(pn->client, NULL, (xEventPtr)&conn, 1, NoEventMask,
|
||||
NoEventMask, NullGrab);
|
||||
}
|
||||
pn = pn->next;
|
||||
--- xorg-server-1.7.99/hw/xfree86/vnc/vncInit.c
|
||||
+++ xorg-server-1.7.99/hw/xfree86/vnc/vncInit.c
|
||||
@@ -34,8 +34,7 @@
|
||||
|
||||
#include "xf86.h"
|
||||
#include "xf86_OSproc.h"
|
||||
-#include "xf86Resources.h"
|
||||
-#include "xf86Version.h"
|
||||
+#include "xorgVersion.h"
|
||||
|
||||
int vncScreenPrivateIndex = -1;
|
||||
int inetdSock = -1;
|
||||
@@ -48,6 +47,8 @@
|
||||
|
||||
extern void VncExtensionInit(void);
|
||||
|
||||
+extern void vncInitMouse(void);
|
||||
+extern void vncInitKeyb(void);
|
||||
Bool VNCInit(ScreenPtr pScreen, unsigned char *FBStart);
|
||||
|
||||
#ifndef XFree86LOADER
|
||||
@@ -56,11 +57,11 @@
|
||||
static const OptionInfoRec *VNCAvailableOptions(void *unused);
|
||||
static void rfbWakeupHandler (int i, pointer blockData, unsigned long err, pointer pReadmask);
|
||||
|
||||
-static Bool vncCursorRealizeCursor(ScreenPtr, CursorPtr);
|
||||
-static Bool vncCursorUnrealizeCursor(ScreenPtr, CursorPtr);
|
||||
-static void vncCursorSetCursor(ScreenPtr, CursorPtr, int, int);
|
||||
-static void vncCursorMoveCursor(ScreenPtr, int, int);
|
||||
-static Bool vncDisplayCursor(ScreenPtr, CursorPtr);
|
||||
+static Bool vncCursorRealizeCursor(DeviceIntPtr, ScreenPtr, CursorPtr);
|
||||
+static Bool vncCursorUnrealizeCursor(DeviceIntPtr, ScreenPtr, CursorPtr);
|
||||
+static void vncCursorSetCursor(DeviceIntPtr, ScreenPtr, CursorPtr, int, int);
|
||||
+static void vncCursorMoveCursor(DeviceIntPtr, ScreenPtr, int, int);
|
||||
+static Bool vncDisplayCursor(DeviceIntPtr, ScreenPtr, CursorPtr);
|
||||
|
||||
static miPointerSpriteFuncRec vncCursorSpriteFuncs = {
|
||||
vncCursorRealizeCursor,
|
||||
@@ -389,23 +390,23 @@
|
||||
/****** miPointerSpriteFunctions *******/
|
||||
|
||||
static Bool
|
||||
-vncCursorRealizeCursor(ScreenPtr pScreen, CursorPtr pCurs)
|
||||
+vncCursorRealizeCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCurs)
|
||||
{
|
||||
vncScreenPtr pScreenPriv = VNCPTR(pScreen);
|
||||
|
||||
- return (*pScreenPriv->spriteFuncs->RealizeCursor)(pScreen, pCurs);
|
||||
+ return (*pScreenPriv->spriteFuncs->RealizeCursor)(pDev, pScreen, pCurs);
|
||||
}
|
||||
|
||||
static Bool
|
||||
-vncCursorUnrealizeCursor(ScreenPtr pScreen, CursorPtr pCurs)
|
||||
+vncCursorUnrealizeCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCurs)
|
||||
{
|
||||
vncScreenPtr pScreenPriv = VNCPTR(pScreen);
|
||||
|
||||
- return (*pScreenPriv->spriteFuncs->UnrealizeCursor)(pScreen, pCurs);
|
||||
+ return (*pScreenPriv->spriteFuncs->UnrealizeCursor)(pDev, pScreen, pCurs);
|
||||
}
|
||||
|
||||
static void
|
||||
-vncCursorSetCursor(ScreenPtr pScreen, CursorPtr pCurs, int x, int y)
|
||||
+vncCursorSetCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCurs, int x, int y)
|
||||
{
|
||||
vncScreenPtr pScreenPriv = VNCPTR(pScreen);
|
||||
|
||||
@@ -426,11 +427,11 @@
|
||||
pScreenPriv->cursorIsDrawn = TRUE;
|
||||
#endif
|
||||
|
||||
- (*pScreenPriv->spriteFuncs->SetCursor)(pScreen, pCurs, x, y);
|
||||
+ (*pScreenPriv->spriteFuncs->SetCursor)(pDev, pScreen, pCurs, x, y);
|
||||
}
|
||||
|
||||
static void
|
||||
-vncCursorMoveCursor(ScreenPtr pScreen, int x, int y)
|
||||
+vncCursorMoveCursor(DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y)
|
||||
{
|
||||
vncScreenPtr pScreenPriv = VNCPTR(pScreen);
|
||||
rfbClientPtr cl;
|
||||
@@ -440,7 +441,7 @@
|
||||
cl->cursorWasMoved = TRUE;
|
||||
}
|
||||
|
||||
- (*pScreenPriv->spriteFuncs->MoveCursor)(pScreen, x, y);
|
||||
+ (*pScreenPriv->spriteFuncs->MoveCursor)(pDev, pScreen, x, y);
|
||||
}
|
||||
|
||||
Bool
|
||||
@@ -505,9 +506,7 @@
|
||||
#endif
|
||||
|
||||
static Bool
|
||||
-vncDisplayCursor(pScreen, pCursor)
|
||||
- ScreenPtr pScreen;
|
||||
- CursorPtr pCursor;
|
||||
+vncDisplayCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor)
|
||||
{
|
||||
vncScreenPtr pScreenPriv = VNCPTR(pScreen);
|
||||
rfbClientPtr cl;
|
||||
@@ -520,7 +519,7 @@
|
||||
cl->cursorWasChanged = TRUE;
|
||||
}
|
||||
|
||||
- ret = (*pScreen->DisplayCursor)(pScreen, pCursor);
|
||||
+ ret = (*pScreen->DisplayCursor)(pDev, pScreen, pCursor);
|
||||
|
||||
pScreen->DisplayCursor = vncDisplayCursor;
|
||||
|
||||
@@ -586,6 +585,7 @@
|
||||
NULL /* ModuleTearDownProc */
|
||||
};
|
||||
|
||||
+#if 0
|
||||
ModuleInfoRec VNC = {
|
||||
1, /* moduleVersion */
|
||||
"VNC", /* moduleName */
|
||||
@@ -593,6 +593,7 @@
|
||||
0, /* refCount */
|
||||
VNCAvailableOptions, /* function returning array of OptionsInfoRec */
|
||||
};
|
||||
+#endif
|
||||
|
||||
ExtensionModule vncExtensionModule = {
|
||||
VncExtensionInit, /* initFunc */
|
@ -1,43 +0,0 @@
|
||||
--- hw/vnc/vncext.c
|
||||
+++ hw/vnc/vncext.c
|
||||
@@ -140,7 +140,7 @@
|
||||
if (rec) {
|
||||
rec->client = client;
|
||||
rec->fakeID = FakeClientID(client->index);
|
||||
- rec->res = CreateNewResourceType(VncDestroyClientResourceCallback);
|
||||
+ rec->res = CreateNewResourceType(VncDestroyClientResourceCallback,"DestroyClientResourceCallback");
|
||||
if (!AddResource(rec->fakeID, rec->res, rec)) {
|
||||
xfree(rec);
|
||||
}
|
||||
@@ -689,7 +689,7 @@
|
||||
|
||||
VncResourceGeneration = serverGeneration;
|
||||
|
||||
- if (!(VncNotifyList = CreateNewResourceType(VncDestroyNotifyList))) {
|
||||
+ if (!(VncNotifyList = CreateNewResourceType(VncDestroyNotifyList,"DestroyNotifyList"))) {
|
||||
ErrorF("CreateResourceTypes: failed to allocate vnc notify list resource.\n");
|
||||
return FALSE;
|
||||
}
|
||||
--- hw/vnc/init.c
|
||||
+++ hw/vnc/init.c
|
||||
@@ -984,6 +984,11 @@
|
||||
}
|
||||
|
||||
void
|
||||
+CloseInput()
|
||||
+{
|
||||
+}
|
||||
+
|
||||
+void
|
||||
OsVendorInit()
|
||||
{
|
||||
}
|
||||
@@ -1047,7 +1052,7 @@
|
||||
}
|
||||
|
||||
int
|
||||
-NewInputDeviceRequest(InputOption *options, DeviceIntPtr *pdev)
|
||||
+NewInputDeviceRequest(InputOption *options, InputAttributes *attrs, DeviceIntPtr *pdev)
|
||||
{
|
||||
return BadValue;
|
||||
}
|
@ -1,612 +0,0 @@
|
||||
Index: xorg-server-1.9.3/hw/vnc/rfb.h
|
||||
===================================================================
|
||||
--- xorg-server-1.9.3.orig/hw/vnc/rfb.h
|
||||
+++ xorg-server-1.9.3/hw/vnc/rfb.h
|
||||
@@ -189,8 +189,8 @@ typedef struct
|
||||
|
||||
CloseScreenProcPtr CloseScreen;
|
||||
CreateGCProcPtr CreateGC;
|
||||
- PaintWindowBackgroundProcPtr PaintWindowBackground;
|
||||
- PaintWindowBorderProcPtr PaintWindowBorder;
|
||||
+// PaintWindowBackgroundProcPtr PaintWindowBackground;
|
||||
+// PaintWindowBorderProcPtr PaintWindowBorder;
|
||||
CopyWindowProcPtr CopyWindow;
|
||||
ClearToBackgroundProcPtr ClearToBackground;
|
||||
RestoreAreasProcPtr RestoreAreas;
|
||||
Index: xorg-server-1.9.3/hw/vnc/draw.c
|
||||
===================================================================
|
||||
--- xorg-server-1.9.3.orig/hw/vnc/draw.c
|
||||
+++ xorg-server-1.9.3/hw/vnc/draw.c
|
||||
@@ -61,6 +61,10 @@ in this Software without prior written a
|
||||
|
||||
int rfbDeferUpdateTime = 40; /* ms */
|
||||
|
||||
+extern DevPrivateKeyRec rfbGCKeyRec;
|
||||
+#define rfbGCKey (&rfbGCKeyRec)
|
||||
+
|
||||
+
|
||||
|
||||
/****************************************************************************/
|
||||
/*
|
||||
@@ -217,8 +221,8 @@ rfbCloseScreen (int i, ScreenPtr pScreen
|
||||
|
||||
pScreen->CloseScreen = pVNC->CloseScreen;
|
||||
pScreen->CreateGC = pVNC->CreateGC;
|
||||
- pScreen->PaintWindowBackground = pVNC->PaintWindowBackground;
|
||||
- pScreen->PaintWindowBorder = pVNC->PaintWindowBorder;
|
||||
+// pScreen->PaintWindowBackground = pVNC->PaintWindowBackground;
|
||||
+// pScreen->PaintWindowBorder = pVNC->PaintWindowBorder;
|
||||
pScreen->CopyWindow = pVNC->CopyWindow;
|
||||
pScreen->ClearToBackground = pVNC->ClearToBackground;
|
||||
pScreen->RestoreAreas = pVNC->RestoreAreas;
|
||||
@@ -252,7 +256,7 @@ rfbEnableDisableFBAccess (int index, Boo
|
||||
* control even when switched away.
|
||||
*/
|
||||
if (!enable) {
|
||||
- WindowPtr pWin = WindowTable[index];
|
||||
+ WindowPtr pWin = pScrn->pScreen->root;
|
||||
ScreenPtr pScreen = pWin->drawable.pScreen;
|
||||
GCPtr pGC;
|
||||
xRectangle rect;
|
||||
@@ -268,7 +272,7 @@ rfbEnableDisableFBAccess (int index, Boo
|
||||
CARD32 attributes[2];
|
||||
attributes[0] = pScreen->whitePixel;
|
||||
attributes[1] = pScreen->blackPixel;
|
||||
- (void)ChangeGC(pGC, GCForeground | GCBackground, attributes);
|
||||
+ (void)ChangeGC(NullClient, pGC, GCForeground | GCBackground, attributes);
|
||||
|
||||
ValidateGC((DrawablePtr)pWin, pGC);
|
||||
|
||||
@@ -317,6 +321,7 @@ rfbCreateGC (GCPtr pGC)
|
||||
return ret;
|
||||
}
|
||||
|
||||
+#if 0
|
||||
/*
|
||||
* PaintWindowBackground - the region being modified is just the given region.
|
||||
*/
|
||||
@@ -356,6 +361,7 @@ rfbPaintWindowBorder (WindowPtr pWin, Re
|
||||
|
||||
SCREEN_EPILOGUE(PaintWindowBorder,rfbPaintWindowBorder);
|
||||
}
|
||||
+#endif
|
||||
|
||||
#ifdef CHROMIUM
|
||||
Bool
|
||||
Index: xorg-server-1.9.3/hw/vnc/init.c
|
||||
===================================================================
|
||||
--- xorg-server-1.9.3.orig/hw/vnc/init.c
|
||||
+++ xorg-server-1.9.3/hw/vnc/init.c
|
||||
@@ -670,8 +670,8 @@ rfbScreenInit(index, pScreen, argc, argv
|
||||
prfb->CloseScreen = pScreen->CloseScreen;
|
||||
prfb->WakeupHandler = pScreen->WakeupHandler;
|
||||
prfb->CreateGC = pScreen->CreateGC;
|
||||
- prfb->PaintWindowBackground = pScreen->PaintWindowBackground;
|
||||
- prfb->PaintWindowBorder = pScreen->PaintWindowBorder;
|
||||
+// prfb->PaintWindowBackground = pScreen->PaintWindowBackground;
|
||||
+// prfb->PaintWindowBorder = pScreen->PaintWindowBorder;
|
||||
prfb->CopyWindow = pScreen->CopyWindow;
|
||||
prfb->ClearToBackground = pScreen->ClearToBackground;
|
||||
prfb->RestoreAreas = pScreen->RestoreAreas;
|
||||
@@ -691,8 +691,8 @@ rfbScreenInit(index, pScreen, argc, argv
|
||||
pScreen->CloseScreen = rfbCloseScreen;
|
||||
pScreen->WakeupHandler = rfbWakeupHandler;
|
||||
pScreen->CreateGC = rfbCreateGC;
|
||||
- pScreen->PaintWindowBackground = rfbPaintWindowBackground;
|
||||
- pScreen->PaintWindowBorder = rfbPaintWindowBorder;
|
||||
+// pScreen->PaintWindowBackground = rfbPaintWindowBackground;
|
||||
+// pScreen->PaintWindowBorder = rfbPaintWindowBorder;
|
||||
pScreen->CopyWindow = rfbCopyWindow;
|
||||
pScreen->ClearToBackground = rfbClearToBackground;
|
||||
pScreen->RestoreAreas = rfbRestoreAreas;
|
||||
Index: xorg-server-1.9.3/hw/vnc/sprite.c
|
||||
===================================================================
|
||||
--- xorg-server-1.9.3.orig/hw/vnc/sprite.c
|
||||
+++ xorg-server-1.9.3/hw/vnc/sprite.c
|
||||
@@ -96,8 +96,10 @@ static void rfbSpriteInstallColormap
|
||||
static void rfbSpriteStoreColors(ColormapPtr pMap, int ndef,
|
||||
xColorItem *pdef);
|
||||
|
||||
+#if 0
|
||||
static void rfbSpritePaintWindowBackground(WindowPtr pWin,
|
||||
RegionPtr pRegion, int what);
|
||||
+#endif
|
||||
static void rfbSpritePaintWindowBorder(WindowPtr pWin,
|
||||
RegionPtr pRegion, int what);
|
||||
static void rfbSpriteCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg,
|
||||
@@ -112,8 +114,9 @@ static void rfbSpriteSaveDoomedAreas
|
||||
static RegionPtr rfbSpriteRestoreAreas(WindowPtr pWin, RegionPtr pRgnExposed);
|
||||
static void rfbSpriteComputeSaved(ScreenPtr pScreen);
|
||||
|
||||
-static int rfbSpriteScreenKeyStore;
|
||||
-static DevPrivateKey rfbSpriteScreenKey = &rfbSpriteScreenKeyStore;
|
||||
+static DevPrivateKeyRec rfbSpriteScreenKeyRec;
|
||||
+#define rfbSpriteScreenKey (&rfbSpriteScreenKeyRec)
|
||||
+
|
||||
|
||||
#define SCREEN_PROLOGUE(pScreen, field) ((pScreen)->field = \
|
||||
((rfbSpriteScreenPtr)dixLookupPrivate(&(pScreen)->devPrivates, \
|
||||
@@ -145,8 +148,8 @@ static GCFuncs rfbSpriteGCFuncs = {
|
||||
rfbSpriteCopyClip,
|
||||
};
|
||||
|
||||
-static int rfbSpriteGCKeyStore;
|
||||
-static DevPrivateKey rfbSpriteGCKey = &rfbSpriteGCKeyStore;
|
||||
+static DevPrivateKeyRec rfbSpriteGCKeyRec;
|
||||
+#define rfbSpriteGCKey (&rfbSpriteGCKeyRec)
|
||||
|
||||
#define GC_FUNC_PROLOGUE(pGC) \
|
||||
rfbSpriteGCPtr pGCPriv = \
|
||||
@@ -329,7 +332,10 @@ rfbSpriteInitialize (pScreen, cursorFunc
|
||||
rfbSpriteScreenPtr pPriv;
|
||||
VisualPtr pVisual;
|
||||
|
||||
- if (!dixRequestPrivate(rfbSpriteGCKey, sizeof(rfbSpriteGCRec)))
|
||||
+ if (!dixRegisterPrivateKey(rfbSpriteScreenKey, PRIVATE_SCREEN, 0))
|
||||
+ return FALSE;
|
||||
+
|
||||
+ if (!dixRegisterPrivateKey(rfbSpriteGCKey, PRIVATE_GC, sizeof(rfbSpriteGCRec)))
|
||||
return FALSE;
|
||||
|
||||
pPriv = (rfbSpriteScreenPtr) xalloc (sizeof (rfbSpriteScreenRec));
|
||||
@@ -357,8 +363,8 @@ rfbSpriteInitialize (pScreen, cursorFunc
|
||||
pPriv->StoreColors = pScreen->StoreColors;
|
||||
pPriv->DisplayCursor = pScreen->DisplayCursor;
|
||||
|
||||
- pPriv->PaintWindowBackground = pScreen->PaintWindowBackground;
|
||||
- pPriv->PaintWindowBorder = pScreen->PaintWindowBorder;
|
||||
+// pPriv->PaintWindowBackground = pScreen->PaintWindowBackground;
|
||||
+// pPriv->PaintWindowBorder = pScreen->PaintWindowBorder;
|
||||
pPriv->CopyWindow = pScreen->CopyWindow;
|
||||
pPriv->ClearToBackground = pScreen->ClearToBackground;
|
||||
|
||||
@@ -393,8 +399,8 @@ rfbSpriteInitialize (pScreen, cursorFunc
|
||||
pScreen->InstallColormap = rfbSpriteInstallColormap;
|
||||
pScreen->StoreColors = rfbSpriteStoreColors;
|
||||
|
||||
- pScreen->PaintWindowBackground = rfbSpritePaintWindowBackground;
|
||||
- pScreen->PaintWindowBorder = rfbSpritePaintWindowBorder;
|
||||
+// pScreen->PaintWindowBackground = rfbSpritePaintWindowBackground;
|
||||
+// pScreen->PaintWindowBorder = rfbSpritePaintWindowBorder;
|
||||
pScreen->CopyWindow = rfbSpriteCopyWindow;
|
||||
pScreen->ClearToBackground = rfbSpriteClearToBackground;
|
||||
|
||||
@@ -435,8 +441,8 @@ rfbSpriteCloseScreen (i, pScreen)
|
||||
pScreen->InstallColormap = pScreenPriv->InstallColormap;
|
||||
pScreen->StoreColors = pScreenPriv->StoreColors;
|
||||
|
||||
- pScreen->PaintWindowBackground = pScreenPriv->PaintWindowBackground;
|
||||
- pScreen->PaintWindowBorder = pScreenPriv->PaintWindowBorder;
|
||||
+// pScreen->PaintWindowBackground = pScreenPriv->PaintWindowBackground;
|
||||
+// pScreen->PaintWindowBorder = pScreenPriv->PaintWindowBorder;
|
||||
pScreen->CopyWindow = pScreenPriv->CopyWindow;
|
||||
pScreen->ClearToBackground = pScreenPriv->ClearToBackground;
|
||||
|
||||
@@ -809,6 +815,7 @@ rfbSpriteRestoreAreas (pWin, prgnExposed
|
||||
* Window wrappers
|
||||
*/
|
||||
|
||||
+#if 0
|
||||
static void
|
||||
rfbSpritePaintWindowBackground (pWin, pRegion, what)
|
||||
WindowPtr pWin;
|
||||
@@ -866,6 +873,7 @@ rfbSpritePaintWindowBorder (pWin, pRegio
|
||||
|
||||
SCREEN_EPILOGUE (pScreen, PaintWindowBorder, rfbSpritePaintWindowBorder);
|
||||
}
|
||||
+#endif
|
||||
|
||||
static void
|
||||
rfbSpriteCopyWindow (pWin, ptOldOrg, pRegion)
|
||||
Index: xorg-server-1.9.3/hw/vnc/spritest.h
|
||||
===================================================================
|
||||
--- xorg-server-1.9.3.orig/hw/vnc/spritest.h
|
||||
+++ xorg-server-1.9.3/hw/vnc/spritest.h
|
||||
@@ -70,8 +70,8 @@ typedef struct {
|
||||
ScreenBlockHandlerProcPtr BlockHandler;
|
||||
InstallColormapProcPtr InstallColormap;
|
||||
StoreColorsProcPtr StoreColors;
|
||||
- PaintWindowBackgroundProcPtr PaintWindowBackground;
|
||||
- PaintWindowBorderProcPtr PaintWindowBorder;
|
||||
+// PaintWindowBackgroundProcPtr PaintWindowBackground;
|
||||
+// PaintWindowBorderProcPtr PaintWindowBorder;
|
||||
CopyWindowProcPtr CopyWindow;
|
||||
ClearToBackgroundProcPtr ClearToBackground;
|
||||
SaveDoomedAreasProcPtr SaveDoomedAreas;
|
||||
Index: xorg-server-1.9.3/hw/vnc/cutpaste.c
|
||||
===================================================================
|
||||
--- xorg-server-1.9.3.orig/hw/vnc/cutpaste.c
|
||||
+++ xorg-server-1.9.3/hw/vnc/cutpaste.c
|
||||
@@ -54,7 +54,7 @@ rfbSetXCutText(char *str, int len)
|
||||
Selection *pSel;
|
||||
|
||||
inSetXCutText = TRUE;
|
||||
- ChangeWindowProperty(WindowTable[0], XA_CUT_BUFFER0, XA_STRING,
|
||||
+ ChangeWindowProperty(screenInfo.screens[0]->root, XA_CUT_BUFFER0, XA_STRING,
|
||||
8, PropModeReplace, len,
|
||||
(pointer)str, TRUE);
|
||||
|
||||
Index: xorg-server-1.9.3/hw/vnc/dispcur.c
|
||||
===================================================================
|
||||
--- xorg-server-1.9.3.orig/hw/vnc/dispcur.c
|
||||
+++ xorg-server-1.9.3/hw/vnc/dispcur.c
|
||||
@@ -74,10 +74,10 @@ in this Software without prior written a
|
||||
|
||||
/* per-screen private data */
|
||||
|
||||
-static int rfbDCScreenKeyStore;
|
||||
-static DevPrivateKey rfbDCScreenKey = &rfbDCScreenKeyStore;
|
||||
-static int rfbScreenKeyStore;
|
||||
-static DevPrivateKey rfbScreenKey = &rfbScreenKeyStore;
|
||||
+static DevPrivateKeyRec rfbDCScreenKeyRec;
|
||||
+#define rfbDCScreenKey (&rfbDCScreenKeyRec)
|
||||
+static DevPrivateKeyRec rfbScreenKeyRec;
|
||||
+#define rfbScreenKey (&rfbScreenKeyRec)
|
||||
|
||||
static Bool rfbDCCloseScreen(int index, ScreenPtr pScreen);
|
||||
|
||||
@@ -137,6 +137,12 @@ rfbDCInitialize (ScreenPtr pScreen, miPo
|
||||
{
|
||||
rfbDCScreenPtr pScreenPriv;
|
||||
|
||||
+ if (!dixRegisterPrivateKey(rfbDCScreenKey, PRIVATE_SCREEN, 0))
|
||||
+ return FALSE;
|
||||
+
|
||||
+ if (!dixRegisterPrivateKey(rfbScreenKey, PRIVATE_CURSOR_BITS, 0))
|
||||
+ return FALSE;
|
||||
+
|
||||
pScreenPriv = (rfbDCScreenPtr) xalloc (sizeof (rfbDCScreenRec));
|
||||
if (!pScreenPriv)
|
||||
return FALSE;
|
||||
@@ -340,7 +346,7 @@ rfbDCRealize (ScreenPtr pScreen, CursorP
|
||||
0, 0, pCursor->bits->width, pCursor->bits->height,
|
||||
0, XYPixmap, (char *)pCursor->bits->source);
|
||||
gcvals[0] = GXand;
|
||||
- ChangeGC (pGC, GCFunction, gcvals);
|
||||
+ ChangeGCXIDs (NullClient, pGC, GCFunction, gcvals);
|
||||
ValidateGC ((DrawablePtr)pPriv->sourceBits, pGC);
|
||||
(*pGC->ops->PutImage) ((DrawablePtr)pPriv->sourceBits, pGC, 1,
|
||||
0, 0, pCursor->bits->width, pCursor->bits->height,
|
||||
@@ -348,13 +354,13 @@ rfbDCRealize (ScreenPtr pScreen, CursorP
|
||||
|
||||
/* mask bits -- pCursor->mask & ~pCursor->source */
|
||||
gcvals[0] = GXcopy;
|
||||
- ChangeGC (pGC, GCFunction, gcvals);
|
||||
+ ChangeGCXIDs (NullClient, pGC, GCFunction, gcvals);
|
||||
ValidateGC ((DrawablePtr)pPriv->maskBits, pGC);
|
||||
(*pGC->ops->PutImage) ((DrawablePtr)pPriv->maskBits, pGC, 1,
|
||||
0, 0, pCursor->bits->width, pCursor->bits->height,
|
||||
0, XYPixmap, (char *)pCursor->bits->mask);
|
||||
gcvals[0] = GXandInverted;
|
||||
- ChangeGC (pGC, GCFunction, gcvals);
|
||||
+ ChangeGCXIDs (NullClient, pGC, GCFunction, gcvals);
|
||||
ValidateGC ((DrawablePtr)pPriv->maskBits, pGC);
|
||||
(*pGC->ops->PutImage) ((DrawablePtr)pPriv->maskBits, pGC, 1,
|
||||
0, 0, pCursor->bits->width, pCursor->bits->height,
|
||||
@@ -396,7 +402,7 @@ rfbDCPutBits (DrawablePtr pDrawable, rfb
|
||||
if (sourceGC->fgPixel != source)
|
||||
{
|
||||
gcvals[0] = source;
|
||||
- DoChangeGC (sourceGC, GCForeground, gcvals, 0);
|
||||
+ ChangeGCXIDs (NullClient, sourceGC, GCForeground, gcvals);
|
||||
}
|
||||
if (sourceGC->serialNumber != pDrawable->serialNumber)
|
||||
ValidateGC (pDrawable, sourceGC);
|
||||
@@ -404,7 +410,7 @@ rfbDCPutBits (DrawablePtr pDrawable, rfb
|
||||
if (maskGC->fgPixel != mask)
|
||||
{
|
||||
gcvals[0] = mask;
|
||||
- DoChangeGC (maskGC, GCForeground, gcvals, 0);
|
||||
+ ChangeGCXIDs (NullClient, maskGC, GCForeground, gcvals);
|
||||
}
|
||||
if (maskGC->serialNumber != pDrawable->serialNumber)
|
||||
ValidateGC (pDrawable, maskGC);
|
||||
@@ -451,7 +457,7 @@ rfbDCPutUpCursor (pScreen, pCursor, x, y
|
||||
}
|
||||
pScreenPriv = (rfbDCScreenPtr)dixLookupPrivate(&pScreen->devPrivates,
|
||||
rfbDCScreenKey);
|
||||
- pWin = WindowTable[pScreen->myNum];
|
||||
+ pWin = pScreen->root;
|
||||
#ifdef ARGB_CURSOR
|
||||
if (pPriv->pPicture)
|
||||
{
|
||||
@@ -498,7 +504,7 @@ rfbDCSaveUnderCursor (pScreen, x, y, w,
|
||||
pScreenPriv = (rfbDCScreenPtr)dixLookupPrivate(&pScreen->devPrivates,
|
||||
rfbDCScreenKey);
|
||||
pSave = pScreenPriv->pSave;
|
||||
- pWin = WindowTable[pScreen->myNum];
|
||||
+ pWin = pScreen->root;
|
||||
if (!pSave || pSave->drawable.width < w || pSave->drawable.height < h)
|
||||
{
|
||||
if (pSave)
|
||||
@@ -531,7 +537,7 @@ rfbDCRestoreUnderCursor (pScreen, x, y,
|
||||
pScreenPriv = (rfbDCScreenPtr)dixLookupPrivate(&pScreen->devPrivates,
|
||||
rfbDCScreenKey);
|
||||
pSave = pScreenPriv->pSave;
|
||||
- pWin = WindowTable[pScreen->myNum];
|
||||
+ pWin = pScreen->root;
|
||||
if (!pSave)
|
||||
return FALSE;
|
||||
if (!EnsureGC(pScreenPriv->pRestoreGC, pWin))
|
||||
@@ -558,7 +564,7 @@ rfbDCChangeSave (pScreen, x, y, w, h, dx
|
||||
pScreenPriv = (rfbDCScreenPtr)dixLookupPrivate(&pScreen->devPrivates,
|
||||
rfbDCScreenKey);
|
||||
pSave = pScreenPriv->pSave;
|
||||
- pWin = WindowTable[pScreen->myNum];
|
||||
+ pWin = pScreen->root;
|
||||
/*
|
||||
* restore the bits which are about to get trashed
|
||||
*/
|
||||
@@ -702,7 +708,7 @@ rfbDCMoveCursor (pScreen, pCursor, x, y,
|
||||
}
|
||||
pScreenPriv = (rfbDCScreenPtr)dixLookupPrivate(&pScreen->devPrivates,
|
||||
rfbDCScreenKey);
|
||||
- pWin = WindowTable[pScreen->myNum];
|
||||
+ pWin = pScreen->root;
|
||||
pTemp = pScreenPriv->pTemp;
|
||||
if (!pTemp ||
|
||||
pTemp->drawable.width != pScreenPriv->pSave->drawable.width ||
|
||||
Index: xorg-server-1.9.3/hw/vnc/kbdptr.c
|
||||
===================================================================
|
||||
--- xorg-server-1.9.3.orig/hw/vnc/kbdptr.c
|
||||
+++ xorg-server-1.9.3/hw/vnc/kbdptr.c
|
||||
@@ -153,7 +153,7 @@ KbdAddEvent(Bool down, KeySym keySym, rf
|
||||
#ifdef CORBA
|
||||
if (cl) {
|
||||
CARD32 clientId = cl->sock;
|
||||
- ChangeWindowProperty(WindowTable[0], VNC_LAST_CLIENT_ID, XA_INTEGER,
|
||||
+ ChangeWindowProperty(screenInfo.screens[0]->root, VNC_LAST_CLIENT_ID, XA_INTEGER,
|
||||
32, PropModeReplace, 1, (pointer)&clientId, TRUE);
|
||||
}
|
||||
#endif
|
||||
@@ -310,7 +310,7 @@ PtrAddEvent(int buttonMask, int x, int y
|
||||
#ifdef CORBA
|
||||
if (cl) {
|
||||
CARD32 clientId = cl->sock;
|
||||
- ChangeWindowProperty(WindowTable[0], VNC_LAST_CLIENT_ID, XA_INTEGER,
|
||||
+ ChangeWindowProperty(screenInfo.screens[0]->root, VNC_LAST_CLIENT_ID, XA_INTEGER,
|
||||
32, PropModeReplace, 1, (pointer)&clientId, TRUE);
|
||||
}
|
||||
#endif
|
||||
Index: xorg-server-1.9.3/hw/vnc/rfbserver.c
|
||||
===================================================================
|
||||
--- xorg-server-1.9.3.orig/hw/vnc/rfbserver.c
|
||||
+++ xorg-server-1.9.3/hw/vnc/rfbserver.c
|
||||
@@ -82,7 +82,7 @@ void
|
||||
rfbRootPropertyChange(ScreenPtr pScreen)
|
||||
{
|
||||
PropertyPtr pProp;
|
||||
- WindowPtr pWin = WindowTable[pScreen->myNum];
|
||||
+ WindowPtr pWin = pScreen->root;
|
||||
|
||||
pProp = wUserProps (pWin);
|
||||
|
||||
@@ -1068,7 +1068,7 @@ rfbProcessClientNormalMessage(cl)
|
||||
GenerateVncChromiumConnectedEvent(cl->sock);
|
||||
if (enc == rfbEncodingChromium) {
|
||||
/* Generate exposures for all windows */
|
||||
- WindowPtr pWin = WindowTable[cl->pScreen->myNum];
|
||||
+ WindowPtr pWin = cl->pScreen->root;
|
||||
rfbSetClip(pWin, 1);
|
||||
}
|
||||
else {
|
||||
@@ -1866,13 +1866,13 @@ rfbSendSetColourMapEntries(cl, firstColo
|
||||
|
||||
/* PseudoColor */
|
||||
#if XFREE86VNC
|
||||
- if (miInstalledMaps[cl->pScreen->myNum]->class == PseudoColor) {
|
||||
+ if (GetInstalledmiColormap(cl->pScreen)->class == PseudoColor) {
|
||||
#else
|
||||
if (pVNC->rfbInstalledColormap->class == PseudoColor) {
|
||||
#endif
|
||||
scme->firstColour = Swap16IfLE(firstColour);
|
||||
#if XFREE86VNC
|
||||
- pent = (EntryPtr)&miInstalledMaps[cl->pScreen->myNum]->red[firstColour];
|
||||
+ pent = (EntryPtr)&GetInstalledmiColormap(cl->pScreen)->red[firstColour];
|
||||
#else
|
||||
pent = (EntryPtr)&pVNC->rfbInstalledColormap->red[firstColour];
|
||||
#endif
|
||||
@@ -1894,12 +1894,12 @@ rfbSendSetColourMapEntries(cl, firstColo
|
||||
|
||||
/* Break the DirectColor pixel into its r/g/b components */
|
||||
#if XFREE86VNC
|
||||
- redPart = (firstColour & miInstalledMaps[cl->pScreen->myNum]->pVisual->redMask)
|
||||
- >> miInstalledMaps[cl->pScreen->myNum]->pVisual->offsetRed;
|
||||
- greenPart = (firstColour & miInstalledMaps[cl->pScreen->myNum]->pVisual->greenMask)
|
||||
- >> miInstalledMaps[cl->pScreen->myNum]->pVisual->offsetGreen;
|
||||
- bluePart = (firstColour & miInstalledMaps[cl->pScreen->myNum]->pVisual->blueMask)
|
||||
- >> miInstalledMaps[cl->pScreen->myNum]->pVisual->offsetBlue;
|
||||
+ redPart = (firstColour & GetInstalledmiColormap(cl->pScreen)->pVisual->redMask)
|
||||
+ >> GetInstalledmiColormap(cl->pScreen)->pVisual->offsetRed;
|
||||
+ greenPart = (firstColour & GetInstalledmiColormap(cl->pScreen)->pVisual->greenMask)
|
||||
+ >> GetInstalledmiColormap(cl->pScreen)->pVisual->offsetGreen;
|
||||
+ bluePart = (firstColour & GetInstalledmiColormap(cl->pScreen)->pVisual->blueMask)
|
||||
+ >> GetInstalledmiColormap(cl->pScreen)->pVisual->offsetBlue;
|
||||
#else
|
||||
redPart = (firstColour & pVNC->rfbInstalledColormap->pVisual->redMask)
|
||||
>> pVNC->rfbInstalledColormap->pVisual->offsetRed;
|
||||
@@ -1918,9 +1918,9 @@ rfbSendSetColourMapEntries(cl, firstColo
|
||||
scme->firstColour = Swap16IfLE((greenPart << 8) | bluePart);
|
||||
|
||||
#if XFREE86VNC
|
||||
- redEntry = (EntryPtr)&miInstalledMaps[cl->pScreen->myNum]->red[redPart];
|
||||
- greenEntry = (EntryPtr)&miInstalledMaps[cl->pScreen->myNum]->green[greenPart];
|
||||
- blueEntry = (EntryPtr)&miInstalledMaps[cl->pScreen->myNum]->blue[bluePart];
|
||||
+ redEntry = (EntryPtr)&GetInstalledmiColormap(cl->pScreen)->red[redPart];
|
||||
+ greenEntry = (EntryPtr)&GetInstalledmiColormap(cl->pScreen)->green[greenPart];
|
||||
+ blueEntry = (EntryPtr)&GetInstalledmiColormap(cl->pScreen)->blue[bluePart];
|
||||
#else
|
||||
redEntry = (EntryPtr)&pVNC->rfbInstalledColormap->red[redPart];
|
||||
greenEntry = (EntryPtr)&pVNC->rfbInstalledColormap->green[greenPart];
|
||||
Index: xorg-server-1.9.3/hw/vnc/tabletranstemplate.c
|
||||
===================================================================
|
||||
--- xorg-server-1.9.3.orig/hw/vnc/tabletranstemplate.c
|
||||
+++ xorg-server-1.9.3/hw/vnc/tabletranstemplate.c
|
||||
@@ -67,7 +67,7 @@ rfbTranslateWithSingleTableINtoOUT (Scre
|
||||
OUT_T *op = (OUT_T *)optr;
|
||||
OUT_T *opLineEnd;
|
||||
OUT_T *t = (OUT_T *)table;
|
||||
- DrawablePtr pDraw = (DrawablePtr)WindowTable[pScreen->myNum];
|
||||
+ DrawablePtr pDraw = (DrawablePtr)pScreen->root;
|
||||
int truewidth = PixmapBytePad(width, in->bitsPerPixel);
|
||||
unsigned char *iptr = malloc(truewidth * height * in->bitsPerPixel / 8);
|
||||
int ipextra = truewidth - width;
|
||||
@@ -107,7 +107,7 @@ rfbTranslateWithRGBTablesINtoOUT (Screen
|
||||
OUT_T *redTable = (OUT_T *)table;
|
||||
OUT_T *greenTable = redTable + in->redMax + 1;
|
||||
OUT_T *blueTable = greenTable + in->greenMax + 1;
|
||||
- DrawablePtr pDraw = (DrawablePtr)WindowTable[pScreen->myNum];
|
||||
+ DrawablePtr pDraw = (DrawablePtr)pScreen->root;
|
||||
int truewidth = PixmapBytePad(width, in->bitsPerPixel);
|
||||
unsigned char *iptr = malloc(truewidth * height * in->bitsPerPixel / 8);
|
||||
int ipextra = truewidth - width;
|
||||
Index: xorg-server-1.9.3/hw/vnc/translate.c
|
||||
===================================================================
|
||||
--- xorg-server-1.9.3.orig/hw/vnc/translate.c
|
||||
+++ xorg-server-1.9.3/hw/vnc/translate.c
|
||||
@@ -167,7 +167,7 @@ rfbTranslateNone(ScreenPtr pScreen, char
|
||||
int width, int height, int x, int y)
|
||||
{
|
||||
VNCSCREENPTR(pScreen);
|
||||
- DrawablePtr pDraw = (DrawablePtr)WindowTable[pScreen->myNum];
|
||||
+ DrawablePtr pDraw = (DrawablePtr)pScreen->root;
|
||||
int truewidth = PixmapBytePad(width, in->bitsPerPixel);
|
||||
|
||||
if ((x + width > pVNC->width) || truewidth != width * in->bitsPerPixel / 8) {
|
||||
@@ -227,7 +227,7 @@ rfbSetTranslateFunction(cl)
|
||||
if (!pVNC->rfbServerFormat.trueColour &&
|
||||
(pVNC->rfbServerFormat.bitsPerPixel != 8) &&
|
||||
#if XFREE86VNC
|
||||
- (miInstalledMaps[cl->pScreen->myNum]->class == PseudoColor)) {
|
||||
+ (GetInstalledmiColormap(cl->pScreen)->class == PseudoColor)) {
|
||||
#else
|
||||
(pVNC->rfbInstalledColormap->class == PseudoColor)) {
|
||||
#endif
|
||||
@@ -241,7 +241,7 @@ rfbSetTranslateFunction(cl)
|
||||
if (!cl->format.trueColour &&
|
||||
(cl->format.bitsPerPixel != 8) &&
|
||||
#if XFREE86VNC
|
||||
- (miInstalledMaps[cl->pScreen->myNum]->class == PseudoColor)) {
|
||||
+ (GetInstalledmiColormap(cl->pScreen)->class == PseudoColor)) {
|
||||
#else
|
||||
(pVNC->rfbInstalledColormap->class == PseudoColor) ) {
|
||||
#endif
|
||||
@@ -265,7 +265,7 @@ rfbSetTranslateFunction(cl)
|
||||
/* colour map -> colour map */
|
||||
|
||||
#if XFREE86VNC
|
||||
- if (miInstalledMaps[cl->pScreen->myNum]->class == DirectColor) {
|
||||
+ if (GetInstalledmiColormap(cl->pScreen)->class == DirectColor) {
|
||||
#else
|
||||
if (pVNC->rfbInstalledColormap->class == DirectColor) {
|
||||
#endif
|
||||
@@ -433,7 +433,7 @@ rfbSetClientColourMap(cl, firstColour, n
|
||||
|
||||
if (nColours == 0) {
|
||||
#if XFREE86VNC
|
||||
- nColours = miInstalledMaps[cl->pScreen->myNum]->pVisual->ColormapEntries;
|
||||
+ nColours = GetInstalledmiColormap(cl->pScreen)->pVisual->ColormapEntries;
|
||||
#else
|
||||
nColours = pVNC->rfbInstalledColormap->pVisual->ColormapEntries;
|
||||
#endif
|
||||
Index: xorg-server-1.9.3/hw/dmx/vnc/vncint.h
|
||||
===================================================================
|
||||
--- xorg-server-1.9.3.orig/hw/dmx/vnc/vncint.h
|
||||
+++ xorg-server-1.9.3/hw/dmx/vnc/vncint.h
|
||||
@@ -114,8 +114,8 @@ typedef struct {
|
||||
|
||||
CloseScreenProcPtr CloseScreen;
|
||||
CreateGCProcPtr CreateGC;
|
||||
- PaintWindowBackgroundProcPtr PaintWindowBackground;
|
||||
- PaintWindowBorderProcPtr PaintWindowBorder;
|
||||
+// PaintWindowBackgroundProcPtr PaintWindowBackground;
|
||||
+// PaintWindowBorderProcPtr PaintWindowBorder;
|
||||
CopyWindowProcPtr CopyWindow;
|
||||
ClearToBackgroundProcPtr ClearToBackground;
|
||||
RestoreAreasProcPtr RestoreAreas;
|
||||
Index: xorg-server-1.9.3/hw/xfree86/vnc/vncint.h
|
||||
===================================================================
|
||||
--- xorg-server-1.9.3.orig/hw/xfree86/vnc/vncint.h
|
||||
+++ xorg-server-1.9.3/hw/xfree86/vnc/vncint.h
|
||||
@@ -112,8 +112,8 @@ typedef struct {
|
||||
|
||||
CloseScreenProcPtr CloseScreen;
|
||||
CreateGCProcPtr CreateGC;
|
||||
- PaintWindowBackgroundProcPtr PaintWindowBackground;
|
||||
- PaintWindowBorderProcPtr PaintWindowBorder;
|
||||
+// PaintWindowBackgroundProcPtr PaintWindowBackground;
|
||||
+// PaintWindowBorderProcPtr PaintWindowBorder;
|
||||
CopyWindowProcPtr CopyWindow;
|
||||
ClearToBackgroundProcPtr ClearToBackground;
|
||||
RestoreAreasProcPtr RestoreAreas;
|
||||
Index: xorg-server-1.9.3/hw/vnc/vncext.c
|
||||
===================================================================
|
||||
--- xorg-server-1.9.3.orig/hw/vnc/vncext.c
|
||||
+++ xorg-server-1.9.3/hw/vnc/vncext.c
|
||||
@@ -36,9 +36,10 @@
|
||||
#include <arpa/inet.h>
|
||||
#include <netdb.h>
|
||||
|
||||
-static int vncCreateScreenResourcesKeyStore, rfbGCKeyStore;
|
||||
-DevPrivateKey vncCreateScreenResourcesKey = &vncCreateScreenResourcesKeyStore;
|
||||
-DevPrivateKey rfbGCKey = &rfbGCKeyStore;
|
||||
+static DevPrivateKeyRec vncCreateScreenResourcesKeyRec;
|
||||
+#define vncCreateScreenResourcesKey (&vncCreateScreenResourcesKeyRec)
|
||||
+DevPrivateKeyRec rfbGCKeyRec;
|
||||
+#define rfbGCKey (&rfbGCKeyRec)
|
||||
|
||||
int VncSelectNotify(ClientPtr client, BOOL onoff);
|
||||
void VncExtensionInit(void);
|
||||
@@ -762,8 +763,12 @@ VncExtensionInit(void)
|
||||
|
||||
vncExtGeneration = serverGeneration;
|
||||
|
||||
+ // doesn't seem to be valid any more - mhopf 21.12.2010
|
||||
// no allocation needed for screen privates
|
||||
- if (!dixRequestPrivate(rfbGCKey, sizeof(rfbGCRec)))
|
||||
+ if (!dixRegisterPrivateKey(vncCreateScreenResourcesKey, PRIVATE_SCREEN, 0))
|
||||
+ return;
|
||||
+
|
||||
+ if (!dixRegisterPrivateKey(rfbGCKey, PRIVATE_GC, sizeof(rfbGCRec)))
|
||||
return;
|
||||
|
||||
#if XFREE86VNC
|
||||
Index: xorg-server-1.9.3/hw/vnc/tableinitcmtemplate.c
|
||||
===================================================================
|
||||
--- xorg-server-1.9.3.orig/hw/vnc/tableinitcmtemplate.c
|
||||
+++ xorg-server-1.9.3/hw/vnc/tableinitcmtemplate.c
|
||||
@@ -61,7 +61,7 @@ rfbInitColourMapSingleTableOUT (ScreenPt
|
||||
t = (OUT_T *)*table;
|
||||
|
||||
#if XFREE86VNC
|
||||
- pent = (EntryPtr)&miInstalledMaps[pScreen->myNum]->red[0];
|
||||
+ pent = (EntryPtr)&GetInstalledmiColormap(pScreen)->red[0];
|
||||
#else
|
||||
pent = (EntryPtr)&pVNC->rfbInstalledColormap->red[0];
|
||||
#endif
|
||||
Index: xorg-server-1.9.3/hw/xfree86/vnc/vncInit.c
|
||||
===================================================================
|
||||
--- xorg-server-1.9.3.orig/hw/xfree86/vnc/vncInit.c
|
||||
+++ xorg-server-1.9.3/hw/xfree86/vnc/vncInit.c
|
||||
@@ -286,8 +286,8 @@ VNCInit(ScreenPtr pScreen, unsigned char
|
||||
|
||||
pScreenPriv->CloseScreen = pScreen->CloseScreen;
|
||||
pScreenPriv->CreateGC = pScreen->CreateGC;
|
||||
- pScreenPriv->PaintWindowBackground = pScreen->PaintWindowBackground;
|
||||
- pScreenPriv->PaintWindowBorder = pScreen->PaintWindowBorder;
|
||||
+// pScreenPriv->PaintWindowBackground = pScreen->PaintWindowBackground;
|
||||
+// pScreenPriv->PaintWindowBorder = pScreen->PaintWindowBorder;
|
||||
pScreenPriv->CopyWindow = pScreen->CopyWindow;
|
||||
pScreenPriv->ClearToBackground = pScreen->ClearToBackground;
|
||||
pScreenPriv->RestoreAreas = pScreen->RestoreAreas;
|
||||
@@ -313,8 +313,8 @@ VNCInit(ScreenPtr pScreen, unsigned char
|
||||
#endif
|
||||
pScreen->CloseScreen = rfbCloseScreen;
|
||||
pScreen->CreateGC = rfbCreateGC;
|
||||
- pScreen->PaintWindowBackground = rfbPaintWindowBackground;
|
||||
- pScreen->PaintWindowBorder = rfbPaintWindowBorder;
|
||||
+// pScreen->PaintWindowBackground = rfbPaintWindowBackground;
|
||||
+// pScreen->PaintWindowBorder = rfbPaintWindowBorder;
|
||||
pScreen->CopyWindow = rfbCopyWindow;
|
||||
pScreen->ClearToBackground = rfbClearToBackground;
|
||||
pScreen->RestoreAreas = rfbRestoreAreas;
|
@ -1,3 +1,27 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Sep 6 15:55:01 UTC 2011 - sndirsch@suse.com
|
||||
|
||||
- update to xorg-server 1.10.4
|
||||
- VNC patches completely redone by Egbert Eich (N-VNC-*)
|
||||
- Xvnc-pthread.diff: small buildfix required for factory
|
||||
- removed obsolete patches
|
||||
* EXA-mixed-ModifyPixmapHeader-pitch-fixes.-bug-33929.patch
|
||||
* Replace-malloc-with-calloc-to-initialize-the-buffers.patch
|
||||
* U_xserver_fix-pixmaps-lifetime-tracking.patch
|
||||
* commit-5c6a2f9.diff
|
||||
* pad-size-of-system-memory-copy-for-1x1-pixmaps
|
||||
* record-avoid-crash-when-calling-RecordFlushReplyBuff.patch
|
||||
* xorg-server-stop-cpu-eating.diff
|
||||
- adjusted patches
|
||||
* bug534768-prefer_local_symbols.patch
|
||||
* zap_warning_xserver.diff
|
||||
- disabled patches for now
|
||||
* 0001-Xinput-Catch-missing-configlayout-when-deleting-dev.patch
|
||||
* cache-xkbcomp-output-for-fast-start-up.patch
|
||||
* xserver-bg-none-root.patch
|
||||
* 0001-Prevent-XSync-Alarms-from-senslessly-calling-CheckTr.patch
|
||||
- set VIDEO_ABI_VERSION = 10 and INPUT_ABI_VERSION = 12 in specfile
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Aug 30 13:53:46 UTC 2011 - sndirsch@suse.com
|
||||
|
||||
|
@ -19,7 +19,7 @@
|
||||
|
||||
|
||||
Name: xorg-x11-server
|
||||
%define dirsuffix 1.9.3
|
||||
%define dirsuffix 1.10.4
|
||||
%define vnc 1
|
||||
BuildRequires: Mesa-devel bison flex fontconfig-devel freetype2-devel ghostscript-library libdrm-devel libopenssl-devel pkgconfig xorg-x11 xorg-x11-devel xorg-x11-fonts-devel xorg-x11-libICE-devel xorg-x11-libSM-devel xorg-x11-libX11-devel xorg-x11-libXau-devel xorg-x11-libXdmcp-devel xorg-x11-libXext-devel xorg-x11-libXfixes-devel xorg-x11-libXmu-devel xorg-x11-libXp-devel xorg-x11-libXpm-devel xorg-x11-libXprintUtil-devel xorg-x11-libXrender-devel xorg-x11-libXt-devel xorg-x11-libXv-devel xorg-x11-libfontenc-devel xorg-x11-libxkbfile-devel xorg-x11-proto-devel xorg-x11-xtrans-devel
|
||||
### udev support (broken on openSUSE 11.2, see also bnc #589997)
|
||||
@ -40,8 +40,8 @@ PreReq: %fillup_prereq
|
||||
%endif
|
||||
Requires: pkgconfig xorg-x11-fonts-core xorg-x11
|
||||
%ifnarch s390 s390x
|
||||
Provides: VIDEO_ABI_VERSION = 8
|
||||
Provides: INPUT_ABI_VERSION = 11
|
||||
Provides: VIDEO_ABI_VERSION = 10
|
||||
Provides: INPUT_ABI_VERSION = 12
|
||||
Requires: libpixman-1-0 >= 0.15.2
|
||||
%endif
|
||||
Provides: xorg-x11-server-glx xorg-x11-Xvfb
|
||||
@ -59,19 +59,13 @@ Patch6: pu_fixes.diff
|
||||
Patch13: u_OS-acpi-Reconnect-to-acpid-when-it-gets-restarted.patch
|
||||
Patch16: p_xnest-ignore-getimage-errors.diff
|
||||
%if %vnc
|
||||
### Dan Nicholson <dbn.lists@gmail.com>
|
||||
#http://people.freedesktop.org/~dbn/xorg-server-xf4vnc.patch
|
||||
Patch39: xorg-server-xf4vnc.patch
|
||||
Patch40: xorg-server-xf4vnc-disable-dmxvnc.diff
|
||||
Patch42: xorg-server-xf4vnc-TranslateNone.diff
|
||||
Patch43: xorg-server-xf4vnc-abi-version.diff
|
||||
Patch44: xorg-server-xf4vnc-cutpaste.diff
|
||||
Patch46: xorg-server-xf4vnc-busyloop.diff
|
||||
Patch47: xorg-server-xf4vnc-clientTimeout.diff
|
||||
Patch48: xorg-server-xf4vnc-fix.diff
|
||||
Patch49: xorg-server-xf4vnc-fixes_1_8.diff
|
||||
Patch50: xorg-server-xf4vnc-fixes_1_9.diff
|
||||
Patch51: xorg-server-xf4vnc-fix-keyboard-layout-handling.diff
|
||||
Patch17: N-VNC-Add-support-for-VNC.patch
|
||||
Patch18: N-VNC-Readd-timeout-when-vnc-viewer-connection-breaks.patch
|
||||
Patch19: N-VNC-Fix-crash-when-no-depth-translation-is-required.patch
|
||||
Patch20: N-VNC-Don-t-let-VNC-access-the-framebuffer-directly-an.patch
|
||||
Patch21: N-VNC-Enable-use-of-all-keyboard-layouts-independent-o.patch
|
||||
Patch22: N-VNC-Fix-crash-due-to-unset-input-device-names.patch
|
||||
Patch23: Xvnc-pthread.diff
|
||||
%endif
|
||||
Patch45: bug-197858_dpms.diff
|
||||
Patch77: fbdevhw.diff
|
||||
@ -98,15 +92,7 @@ Patch210: pio_ia64.diff
|
||||
Patch211: 0001-Prevent-XSync-Alarms-from-senslessly-calling-CheckTr.patch
|
||||
Patch213: xorg-server-xdmcp.patch
|
||||
Patch220: Use-external-tool-for-creating-backtraces-on-crashes.patch
|
||||
Patch221: commit-5c6a2f9.diff
|
||||
Patch222: sync-fix.patch
|
||||
Patch224: pad-size-of-system-memory-copy-for-1x1-pixmaps
|
||||
Patch225: xorg-server-stop-cpu-eating.diff
|
||||
Patch226: record-avoid-crash-when-calling-RecordFlushReplyBuff.patch
|
||||
Patch227: Replace-malloc-with-calloc-to-initialize-the-buffers.patch
|
||||
Patch228: EXA-mixed-ModifyPixmapHeader-pitch-fixes.-bug-33929.patch
|
||||
Patch229: u_xf4nvc_missing-libz.patch
|
||||
Patch230: U_xserver_fix-pixmaps-lifetime-tracking.patch
|
||||
|
||||
%description
|
||||
This package contains the X.Org Server.
|
||||
@ -171,20 +157,13 @@ An X Window System server for Virtual Network Computing (VNC).
|
||||
%patch13 -p1
|
||||
%patch16 -p2
|
||||
%if %vnc
|
||||
%patch39 -p1
|
||||
%patch40 -p0
|
||||
%patch42 -p1
|
||||
%patch43 -p0
|
||||
%patch44
|
||||
%patch46 -p1
|
||||
%patch47 -p1
|
||||
%patch48 -p1
|
||||
%patch49 -p0
|
||||
%patch50 -p1
|
||||
%patch51 -p1
|
||||
%patch229 -p0
|
||||
%patch230 -p1
|
||||
chmod 755 hw/vnc/symlink-vnc.sh
|
||||
%patch17 -p1
|
||||
%patch18 -p1
|
||||
%patch19 -p1
|
||||
%patch20 -p1
|
||||
%patch21 -p1
|
||||
%patch22 -p1
|
||||
%patch23 -p1
|
||||
%endif
|
||||
%patch45 -p0
|
||||
pushd xorg-docs-*
|
||||
@ -196,7 +175,8 @@ popd
|
||||
%patch106 -p1
|
||||
%patch112 -p0
|
||||
%patch123 -p0
|
||||
%patch125 -p1
|
||||
### disabled for now
|
||||
#%patch125 -p1
|
||||
%patch127 -p1
|
||||
%patch128
|
||||
pushd hw/xfree86/os-support/bus
|
||||
@ -204,25 +184,22 @@ pushd hw/xfree86/os-support/bus
|
||||
popd
|
||||
%patch143 -p0
|
||||
%patch145 -p0
|
||||
%patch162 -p1
|
||||
%patch163 -p1
|
||||
### disabled for now
|
||||
#%patch162 -p1
|
||||
### disabled for now
|
||||
#%patch163 -p1
|
||||
%patch164 -p1
|
||||
%patch200 -p1
|
||||
%patch202 -p1
|
||||
%patch203 -p1
|
||||
%patch206 -p0
|
||||
%patch210 -p1
|
||||
%patch211 -p1
|
||||
### disabled for now
|
||||
#%patch211 -p1
|
||||
%patch213 -p1
|
||||
# Disable backtrace generation patch for now
|
||||
#%patch220 -p1
|
||||
%patch221 -p1
|
||||
%patch222 -p1
|
||||
%patch224 -p1
|
||||
%patch225 -p1
|
||||
%patch226 -p1
|
||||
%patch227 -p1
|
||||
%patch228 -p1
|
||||
|
||||
%build
|
||||
pushd xorg-docs-*
|
||||
@ -300,7 +277,6 @@ mkdir -p $RPM_BUILD_ROOT/usr/%{_lib}/xorg/modules/updates/{fonts,input,linux,dri
|
||||
install -m 644 $RPM_SOURCE_DIR/README.updates $RPM_BUILD_ROOT/usr/%{_lib}/xorg/modules/updates
|
||||
mkdir -p $RPM_BUILD_ROOT/etc/modprobe.d
|
||||
install -m 644 $RPM_SOURCE_DIR/modprobe.nvidia $RPM_BUILD_ROOT/etc/modprobe.d/50-nvidia.conf
|
||||
gzip -c hw/dmx/Xdmx.man > $RPM_BUILD_ROOT/%{_mandir}/man1/Xdmx.1.gz
|
||||
%else
|
||||
rm -f $RPM_BUILD_ROOT/usr/share/aclocal/*.m4
|
||||
%endif
|
||||
@ -428,6 +404,7 @@ exit 0
|
||||
/usr/include/xorg/
|
||||
/usr/%{_lib}/*.a
|
||||
%ifnarch s390 s390x
|
||||
%exclude /usr/%{_lib}/libxf86config.la
|
||||
/usr/%{_lib}/pkgconfig/*.pc
|
||||
/usr/share/aclocal/*.m4
|
||||
%endif
|
||||
|
@ -80,8 +80,8 @@ Index: xorg-server-1.6.3.901/hw/xfree86/common/xf86Config.c
|
||||
Bool dontZoom;
|
||||
Bool notrapSignals; /* don't exit cleanly - die at fault */
|
||||
Bool caughtSignal;
|
||||
--- xorg-server-1.7.99/hw/xfree86/doc/man/Xorg.man.pre
|
||||
+++ xorg-server-1.7.99/hw/xfree86/doc/man/Xorg.man.pre
|
||||
--- xorg-server-1.7.99/hw/xfree86/doc/man/Xorg.man
|
||||
+++ xorg-server-1.7.99/hw/xfree86/doc/man/Xorg.man
|
||||
@@ -438,7 +438,7 @@
|
||||
.B Ctrl+Alt+Backspace
|
||||
Immediately kills the server -- no questions asked. It can be disabled by
|
||||
@ -91,8 +91,8 @@ Index: xorg-server-1.6.3.901/hw/xfree86/common/xf86Config.c
|
||||
__xconfigfile__(__filemansuffix__) file option to a TRUE value.
|
||||
.PP
|
||||
.RS 8
|
||||
--- xorg-server-1.7.99/hw/xfree86/doc/man/xorg.conf.man.pre
|
||||
+++ xorg-server-1.7.99/hw/xfree86/doc/man/xorg.conf.man.pre
|
||||
--- xorg-server-1.7.99/hw/xfree86/doc/man/xorg.conf.man
|
||||
+++ xorg-server-1.7.99/hw/xfree86/doc/man/xorg.conf.man
|
||||
@@ -507,6 +507,13 @@
|
||||
When this option is enabled, the action has no effect.
|
||||
Default: off.
|
||||
|
Loading…
Reference in New Issue
Block a user