Rebuild against xserver 1.10.X.

- 0001-Return-Success-from-generate_modkeymap-when-max_keys.patch merged

Signed-off-by: Adam Tkac <atkac@redhat.com>
This commit is contained in:
Adam Tkac 2010-12-06 16:51:03 +01:00
parent c0e36a7f2f
commit 3a803c7f7a
3 changed files with 233 additions and 63 deletions

View File

@ -1,60 +0,0 @@
From 3fae47581a47613f1117b8794ae37b75ace73f3e Mon Sep 17 00:00:00 2001
From: Adam Tkac <atkac@redhat.com>
Date: Tue, 24 Aug 2010 17:21:30 +0200
Subject: [PATCH] Return Success from generate_modkeymap() when max_keys_per_mod is zero.
max_keys_per_mod equal to zero is a valid situation so generate_modkeymap
should not return BadAlloc in this case.
Signed-off-by: Adam Tkac <atkac@redhat.com>
---
dix/inpututils.c | 24 +++++++++++++-----------
1 files changed, 13 insertions(+), 11 deletions(-)
diff --git a/dix/inpututils.c b/dix/inpututils.c
index 8ec80b5..6693c67 100644
--- a/dix/inpututils.c
+++ b/dix/inpututils.c
@@ -286,7 +286,7 @@ int generate_modkeymap(ClientPtr client, DeviceIntPtr dev,
{
CARD8 keys_per_mod[8];
int max_keys_per_mod;
- KeyCode *modkeymap;
+ KeyCode *modkeymap = NULL;
int i, j, ret;
ret = XaceHook(XACE_DEVICE_ACCESS, client, dev, DixGetAttrAccess);
@@ -310,18 +310,20 @@ int generate_modkeymap(ClientPtr client, DeviceIntPtr dev,
}
}
- modkeymap = calloc(max_keys_per_mod * 8, sizeof(KeyCode));
- if (!modkeymap)
- return BadAlloc;
+ if (max_keys_per_mod != 0) {
+ modkeymap = calloc(max_keys_per_mod * 8, sizeof(KeyCode));
+ if (!modkeymap)
+ return BadAlloc;
- for (i = 0; i < 8; i++)
- keys_per_mod[i] = 0;
+ for (i = 0; i < 8; i++)
+ keys_per_mod[i] = 0;
- for (i = 8; i < MAP_LENGTH; i++) {
- for (j = 0; j < 8; j++) {
- if (dev->key->xkbInfo->desc->map->modmap[i] & (1 << j)) {
- modkeymap[(j * max_keys_per_mod) + keys_per_mod[j]] = i;
- keys_per_mod[j]++;
+ for (i = 8; i < MAP_LENGTH; i++) {
+ for (j = 0; j < 8; j++) {
+ if (dev->key->xkbInfo->desc->map->modmap[i] & (1 << j)) {
+ modkeymap[(j * max_keys_per_mod) + keys_per_mod[j]] = i;
+ keys_per_mod[j]++;
+ }
}
}
}
--
1.7.2.2

View File

@ -2,7 +2,7 @@
Name: tigervnc Name: tigervnc
Version: 1.0.90 Version: 1.0.90
Release: 0.23.%{snap}%{?dist} Release: 0.24.%{snap}%{?dist}
Summary: A TigerVNC remote display system Summary: A TigerVNC remote display system
Group: User Interface/Desktops Group: User Interface/Desktops
@ -43,9 +43,9 @@ Patch0: tigervnc-102434.patch
Patch4: tigervnc-cookie.patch Patch4: tigervnc-cookie.patch
Patch8: tigervnc-viewer-reparent.patch Patch8: tigervnc-viewer-reparent.patch
Patch10: tigervnc11-ldnow.patch Patch10: tigervnc11-ldnow.patch
Patch11: 0001-Return-Success-from-generate_modkeymap-when-max_keys.patch
Patch12: tigervnc11-rh611677.patch Patch12: tigervnc11-rh611677.patch
Patch13: tigervnc11-rh633931.patch Patch13: tigervnc11-rh633931.patch
Patch14: tigervnc11-xorg1.10.patch
%description %description
Virtual Network Computing (VNC) is a remote display system which Virtual Network Computing (VNC) is a remote display system which
@ -133,6 +133,7 @@ This package contains license of the TigerVNC suite
%patch10 -p1 -b .ldnow %patch10 -p1 -b .ldnow
%patch12 -p1 -b .rh611677 %patch12 -p1 -b .rh611677
%patch13 -p1 -b .rh633931 %patch13 -p1 -b .rh633931
%patch14 -p1 -b .xorg1.10
cp -r /usr/share/xorg-x11-server-source/* unix/xserver cp -r /usr/share/xorg-x11-server-source/* unix/xserver
pushd unix/xserver pushd unix/xserver
@ -140,7 +141,6 @@ for all in `find . -type f -perm -001`; do
chmod -x "$all" chmod -x "$all"
done done
patch -p1 -b --suffix .vnc < ../xserver19.patch patch -p1 -b --suffix .vnc < ../xserver19.patch
%patch11 -p1 -b .rh611677-xorg
popd popd
# Use newer gettext # Use newer gettext
@ -303,6 +303,10 @@ fi
%doc LICENCE.TXT %doc LICENCE.TXT
%changelog %changelog
* Mon Dec 06 2010 Adam Tkac <atkac redhat com> 1.0.90-0.24.20100813svn4123
- rebuild against xserver 1.10.X
- 0001-Return-Success-from-generate_modkeymap-when-max_keys.patch merged
* Wed Sep 29 2010 jkeating - 1.0.90-0.23.20100813svn4123 * Wed Sep 29 2010 jkeating - 1.0.90-0.23.20100813svn4123
- Rebuilt for gcc bug 634757 - Rebuilt for gcc bug 634757

226
tigervnc11-xorg1.10.patch Normal file
View File

@ -0,0 +1,226 @@
diff -up tigervnc-1.0.90-20100813svn4123/unix/xserver/hw/vnc/Input.cc.xorg1.10 tigervnc-1.0.90-20100813svn4123/unix/xserver/hw/vnc/Input.cc
--- tigervnc-1.0.90-20100813svn4123/unix/xserver/hw/vnc/Input.cc.xorg1.10 2010-12-06 13:00:10.112567228 +0100
+++ tigervnc-1.0.90-20100813svn4123/unix/xserver/hw/vnc/Input.cc 2010-12-06 13:03:57.172330576 +0100
@@ -30,6 +30,9 @@ extern "C" {
#define public c_public
#define class c_class
#include "inputstr.h"
+#if XORG >= 110
+#include "inpututils.h"
+#endif
#include "mi.h"
#ifndef XKB_IN_SERVER
#define XKB_IN_SERVER
@@ -140,6 +143,9 @@ InputDevice::InputDevice(rfb::VNCServerS
void InputDevice::PointerButtonAction(int buttonMask)
{
int i, n;
+#if XORG >= 110
+ ValuatorMask mask;
+#endif
initInputDevice();
@@ -147,8 +153,14 @@ void InputDevice::PointerButtonAction(in
if ((buttonMask ^ oldButtonMask) & (1 << i)) {
int action = (buttonMask & (1<<i)) ?
ButtonPress : ButtonRelease;
+#if XORG < 110
n = GetPointerEvents(eventq, pointerDev, action, i + 1,
POINTER_RELATIVE, 0, 0, NULL);
+#else
+ valuator_mask_set_range(&mask, 0, 0, NULL);
+ n = GetPointerEvents(eventq, pointerDev, action, i + 1,
+ POINTER_RELATIVE, &mask);
+#endif
enqueueEvents(pointerDev, n);
}
@@ -160,6 +172,9 @@ void InputDevice::PointerButtonAction(in
void InputDevice::PointerMove(const rfb::Point &pos)
{
int n, valuators[2];
+#if XORG >= 110
+ ValuatorMask mask;
+#endif
if (pos.equals(cursorPos))
return;
@@ -168,8 +183,14 @@ void InputDevice::PointerMove(const rfb:
valuators[0] = pos.x;
valuators[1] = pos.y;
+#if XORG < 110
n = GetPointerEvents(eventq, pointerDev, MotionNotify, 0, POINTER_ABSOLUTE, 0,
2, valuators);
+#else
+ valuator_mask_set_range(&mask, 0, 2, valuators);
+ n = GetPointerEvents(eventq, pointerDev, MotionNotify, 0, POINTER_ABSOLUTE,
+ &mask);
+#endif
enqueueEvents(pointerDev, n);
cursorPos = pos;
diff -up tigervnc-1.0.90-20100813svn4123/unix/xserver/hw/vnc/vncHooks.cc.xorg1.10 tigervnc-1.0.90-20100813svn4123/unix/xserver/hw/vnc/vncHooks.cc
--- tigervnc-1.0.90-20100813svn4123/unix/xserver/hw/vnc/vncHooks.cc.xorg1.10 2010-12-06 12:54:18.580543561 +0100
+++ tigervnc-1.0.90-20100813svn4123/unix/xserver/hw/vnc/vncHooks.cc 2010-12-06 12:55:11.630324442 +0100
@@ -72,7 +72,6 @@ typedef struct {
CreateGCProcPtr CreateGC;
CopyWindowProcPtr CopyWindow;
ClearToBackgroundProcPtr ClearToBackground;
- RestoreAreasProcPtr RestoreAreas;
InstallColormapProcPtr InstallColormap;
StoreColorsProcPtr StoreColors;
DisplayCursorProcPtr DisplayCursor;
@@ -120,7 +119,6 @@ static void vncHooksCopyWindow(WindowPtr
RegionPtr pOldRegion);
static void vncHooksClearToBackground(WindowPtr pWin, int x, int y, int w,
int h, Bool generateExposures);
-static RegionPtr vncHooksRestoreAreas(WindowPtr pWin, RegionPtr prgnExposed);
static void vncHooksInstallColormap(ColormapPtr pColormap);
static void vncHooksStoreColors(ColormapPtr pColormap, int ndef,
xColorItem* pdef);
@@ -260,7 +258,6 @@ Bool vncHooksInit(ScreenPtr pScreen, Xse
vncHooksScreen->CreateGC = pScreen->CreateGC;
vncHooksScreen->CopyWindow = pScreen->CopyWindow;
vncHooksScreen->ClearToBackground = pScreen->ClearToBackground;
- vncHooksScreen->RestoreAreas = pScreen->RestoreAreas;
vncHooksScreen->InstallColormap = pScreen->InstallColormap;
vncHooksScreen->StoreColors = pScreen->StoreColors;
vncHooksScreen->DisplayCursor = pScreen->DisplayCursor;
@@ -284,7 +281,6 @@ Bool vncHooksInit(ScreenPtr pScreen, Xse
pScreen->CreateGC = vncHooksCreateGC;
pScreen->CopyWindow = vncHooksCopyWindow;
pScreen->ClearToBackground = vncHooksClearToBackground;
- pScreen->RestoreAreas = vncHooksRestoreAreas;
pScreen->InstallColormap = vncHooksInstallColormap;
pScreen->StoreColors = vncHooksStoreColors;
pScreen->DisplayCursor = vncHooksDisplayCursor;
@@ -334,7 +330,6 @@ static Bool vncHooksCloseScreen(int i, S
pScreen->CreateGC = vncHooksScreen->CreateGC;
pScreen->CopyWindow = vncHooksScreen->CopyWindow;
pScreen->ClearToBackground = vncHooksScreen->ClearToBackground;
- pScreen->RestoreAreas = vncHooksScreen->RestoreAreas;
pScreen->InstallColormap = vncHooksScreen->InstallColormap;
pScreen->StoreColors = vncHooksScreen->StoreColors;
pScreen->DisplayCursor = vncHooksScreen->DisplayCursor;
@@ -428,23 +423,6 @@ static void vncHooksClearToBackground(Wi
SCREEN_REWRAP(ClearToBackground);
}
-// RestoreAreas - changed region is the given region
-
-static RegionPtr vncHooksRestoreAreas(WindowPtr pWin, RegionPtr pRegion)
-{
- SCREEN_UNWRAP(pWin->drawable.pScreen, RestoreAreas);
-
- RegionHelper changed(pScreen, pRegion);
-
- RegionPtr result = (*pScreen->RestoreAreas) (pWin, pRegion);
-
- vncHooksScreen->desktop->add_changed(changed.reg);
-
- SCREEN_REWRAP(RestoreAreas);
-
- return result;
-}
-
// InstallColormap - get the new colormap
static void vncHooksInstallColormap(ColormapPtr pColormap)
diff -up tigervnc-1.0.90-20100813svn4123/unix/xserver/hw/vnc/xorg-version.h.xorg1.10 tigervnc-1.0.90-20100813svn4123/unix/xserver/hw/vnc/xorg-version.h
--- tigervnc-1.0.90-20100813svn4123/unix/xserver/hw/vnc/xorg-version.h.xorg1.10 2010-12-06 12:48:26.884227552 +0100
+++ tigervnc-1.0.90-20100813svn4123/unix/xserver/hw/vnc/xorg-version.h 2010-12-06 12:48:57.553289733 +0100
@@ -34,6 +34,8 @@
#define XORG 18
#elif XORG_VERSION_CURRENT < ((1 * 10000000) + (9 * 100000) + (99 * 1000))
#define XORG 19
+#elif XORG_VERSION_CURRENT < ((1 * 10000000) + (10 * 100000) + (99 * 1000))
+#define XORG 110
#else
#error "X.Org newer than 1.9 is not supported"
#endif
diff -up tigervnc-1.0.90-20100813svn4123/unix/xserver/hw/vnc/xvnc.cc.xorg1.10 tigervnc-1.0.90-20100813svn4123/unix/xserver/hw/vnc/xvnc.cc
--- tigervnc-1.0.90-20100813svn4123/unix/xserver/hw/vnc/xvnc.cc.xorg1.10 2010-12-06 12:55:28.590912483 +0100
+++ tigervnc-1.0.90-20100813svn4123/unix/xserver/hw/vnc/xvnc.cc 2010-12-06 13:07:55.712460842 +0100
@@ -890,10 +890,6 @@ xf86SetRootClip (ScreenPtr pScreen, Bool
WindowPtr pChild;
Bool WasViewable = (Bool)(pWin->viewable);
Bool anyMarked = FALSE;
- RegionPtr pOldClip = NULL, bsExposed;
-#ifdef DO_SAVE_UNDERS
- Bool dosave = FALSE;
-#endif
WindowPtr pLayerWin;
BoxRec box;
@@ -951,12 +947,6 @@ xf86SetRootClip (ScreenPtr pScreen, Bool
if (WasViewable)
{
- if (pWin->backStorage)
- {
- pOldClip = REGION_CREATE(pScreen, NullBox, 1);
- REGION_COPY(pScreen, pOldClip, &pWin->clipList);
- }
-
if (pWin->firstChild)
{
anyMarked |= (*pScreen->MarkOverlappedWindows)(pWin->firstChild,
@@ -969,47 +959,14 @@ xf86SetRootClip (ScreenPtr pScreen, Bool
anyMarked = TRUE;
}
-#ifdef DO_SAVE_UNDERS
- if (DO_SAVE_UNDERS(pWin))
- {
- dosave = (*pScreen->ChangeSaveUnder)(pLayerWin, pLayerWin);
- }
-#endif /* DO_SAVE_UNDERS */
-
if (anyMarked)
(*pScreen->ValidateTree)(pWin, NullWindow, VTOther);
}
- if (pWin->backStorage &&
- ((pWin->backingStore == Always) || WasViewable))
- {
- if (!WasViewable)
- pOldClip = &pWin->clipList; /* a convenient empty region */
- bsExposed = (*pScreen->TranslateBackingStore)
- (pWin, 0, 0, pOldClip,
- pWin->drawable.x, pWin->drawable.y);
- if (WasViewable)
- REGION_DESTROY(pScreen, pOldClip);
- if (bsExposed)
- {
- RegionPtr valExposed = NullRegion;
-
- if (pWin->valdata)
- valExposed = &pWin->valdata->after.exposed;
- (*pScreen->WindowExposures) (pWin, valExposed, bsExposed);
- if (valExposed)
- REGION_EMPTY(pScreen, valExposed);
- REGION_DESTROY(pScreen, bsExposed);
- }
- }
if (WasViewable)
{
if (anyMarked)
(*pScreen->HandleExposures)(pWin);
-#ifdef DO_SAVE_UNDERS
- if (dosave)
- (*pScreen->PostChangeSaveUnder)(pLayerWin, pLayerWin);
-#endif /* DO_SAVE_UNDERS */
if (anyMarked && pScreen->PostValidateTree)
(*pScreen->PostValidateTree)(pWin, NullWindow, VTOther);
}
@@ -1184,8 +1141,6 @@ vfbScreenInit(int index, ScreenPtr pScre
if (!ret) return FALSE;
- miInitializeBackingStore(pScreen);
-
/*
* Circumvent the backing store that was just initialised. This amounts
* to a truely bizarre way of initialising SaveDoomedAreas and friends.