Accepting request 56775 from X11:XOrg

Accepted submit request 56775 from user sndirsch

OBS-URL: https://build.opensuse.org/request/show/56775
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/xorg-x11-server?expand=0&rev=189
This commit is contained in:
Ruediger Oertel 2010-12-28 23:43:56 +00:00 committed by Git OBS Bridge
commit 9907383ad1
6 changed files with 290 additions and 4 deletions

57
sync-fix.patch Normal file
View File

@ -0,0 +1,57 @@
--- xorg-server-1.9.1/Xext/sync.c 2010-11-16 23:11:56.751124639 -0500
+++ xorg-server-1.9.1/Xext/sync.c 2010-11-16 23:13:16.327862535 -0500
@@ -2264,8 +2264,44 @@
static void
IdleTimeQueryValue (pointer pCounter, CARD64 *pValue_return)
{
- CARD32 idle = GetTimeInMillis() - lastDeviceEventTime.milliseconds;
+ static CARD32 previousLastDeviceEventTimeMilliseconds = 0;
+ CARD32 now = GetTimeInMillis();
+ CARD32 idle = now - lastDeviceEventTime.milliseconds;
+ CARD32 previousIdle = now - previousLastDeviceEventTimeMilliseconds;
+ SyncCounter *pIdleTimeCounter = (SyncCounter*)pCounter;
+
XSyncIntsToValue (pValue_return, idle, 0);
+
+ if (pCounter == NULL)
+ {
+ return;
+ }
+ if (previousLastDeviceEventTimeMilliseconds == 0)
+ {
+ /* initialize static var when this function is invoked the first time. */
+ previousLastDeviceEventTimeMilliseconds = lastDeviceEventTime.milliseconds;
+ return;
+ }
+
+ if (previousLastDeviceEventTimeMilliseconds == lastDeviceEventTime.milliseconds)
+ {
+ /* no new user event, no need to change idle counter. */
+ return;
+ }
+ previousLastDeviceEventTimeMilliseconds = lastDeviceEventTime.milliseconds;
+
+ /*
+ * Some user event occured; now update idle counter with previous
+ * event time, so idle counter has the most up-to-date value with
+ * respect to previous user event (we need old and new counter
+ * value to compute if a transition occured). Recompute bracket
+ * values if this is system counter.
+ */
+
+ XSyncIntsToValue (&pIdleTimeCounter->value, previousIdle, 0);
+ if (IsSystemCounter(pIdleTimeCounter)) {
+ SyncComputeBracketValues(pIdleTimeCounter);
+ }
}
static void
@@ -2342,7 +2378,7 @@
if (!pIdleTimeValueLess && !pIdleTimeValueGreater)
return;
- IdleTimeQueryValue (NULL, &idle);
+ IdleTimeQueryValue (IdleTimeCounter, &idle);
if ((pIdleTimeValueGreater &&
XSyncValueGreaterOrEqual (idle, *pIdleTimeValueGreater)) ||

56
use-last-screen.patch Normal file
View File

@ -0,0 +1,56 @@
From ee0e658bb6cb0d1290072090f1de90ff44145365 Mon Sep 17 00:00:00 2001
From: Dan Nicholson <dbn.lists@gmail.com>
Date: Thu, 16 Dec 2010 06:01:06 -0800
Subject: [PATCH] xfree86: Use last Screen section found to prefer xorg.conf
Allowing multiple .conf files with xorg.conf.d works well for InputClass
where any section in xorg.conf would override settings from previous
.conf files typically installed by the distro. This does not work well
with Screen sections where the first section found has been used when
the Layout doesn't specify a Screen. Instead, use the last Screen
section found to give preference to xorg.conf and match the InputScreen
semantics.
Signed-off-by: Dan Nicholson <dbn.lists@gmail.com>
---
hw/xfree86/common/xf86Config.c | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/hw/xfree86/common/xf86Config.c b/hw/xfree86/common/xf86Config.c
index 5800700..b2fc8e3 100644
--- a/hw/xfree86/common/xf86Config.c
+++ b/hw/xfree86/common/xf86Config.c
@@ -1678,7 +1678,7 @@ configLayout(serverLayoutPtr servlayoutp, XF86ConfLayoutPtr conf_layout,
}
/*
- * No layout section, so find the first Screen section and set that up as
+ * No layout section, so find the last Screen section and set that up as
* the only active screen.
*/
static Bool
@@ -1697,7 +1697,7 @@ configImpliedLayout(serverLayoutPtr servlayoutp, XF86ConfScreenPtr conf_screen,
/*
* which screen section is the active one?
*
- * If there is a -screen option, use that one, otherwise use the first
+ * If there is a -screen option, use that one, otherwise use the last
* one.
*/
@@ -1710,6 +1710,12 @@ configImpliedLayout(serverLayoutPtr servlayoutp, XF86ConfScreenPtr conf_screen,
}
conf_screen = s;
from = X_CMDLINE;
+ } else {
+ /* Use the last Screen in the list */
+ s = conf_screen;
+ while (s->list.next)
+ s = s->list.next;
+ conf_screen = s;
}
/* We have exactly one screen */
--
1.7.2.3

View File

@ -0,0 +1,25 @@
Index: xorg-server-1.6.5/hw/vnc/kbdptr.c
===================================================================
--- xorg-server-1.6.5.orig/hw/vnc/kbdptr.c
+++ xorg-server-1.6.5/hw/vnc/kbdptr.c
@@ -166,7 +166,9 @@ KbdAddEvent(Bool down, KeySym keySym, rf
if (!kbdDevice)
return;
- keySyms = &kbdDevice->key->curKeySyms;
+ /* Use virtual core keyboard for keysyms - see discussion on
+ * https://defect.opensolaris.org/bz/show_bug.cgi?id=8687 */
+ keySyms = &inputInfo.keyboard->key->curKeySyms;
#ifdef CORBA
if (cl) {
@@ -277,7 +279,8 @@ KbdAddEvent(Bool down, KeySym keySym, rf
shiftMustBePressed = TRUE;
}
- SendMappingNotify(kbdDevice, MappingKeyboard, keyCode, 1, serverClient);
+ /* Use virtual core keyboard for keysyms */
+ SendMappingNotify(inputInfo.keyboard, MappingKeyboard, keyCode, 1, serverClient);
ErrorF("KbdAddEvent: unknown KeySym 0x%x - allocating KeyCode %d\n",
(int)keySym, keyCode);

View File

@ -0,0 +1,110 @@
diff -urp xorg-server-1.9.3.orig//hw/vnc/dispcur.c xorg-server-1.9.3/hw/vnc/dispcur.c
--- xorg-server-1.9.3.orig//hw/vnc/dispcur.c 2010-12-21 16:51:38.000000000 +0100
+++ xorg-server-1.9.3/hw/vnc/dispcur.c 2010-12-21 18:23:02.000000000 +0100
@@ -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;
diff -urp xorg-server-1.9.3.orig//hw/vnc/draw.c xorg-server-1.9.3/hw/vnc/draw.c
--- xorg-server-1.9.3.orig//hw/vnc/draw.c 2010-12-21 16:51:38.000000000 +0100
+++ xorg-server-1.9.3/hw/vnc/draw.c 2010-12-21 18:30:00.000000000 +0100
@@ -61,6 +61,10 @@ in this Software without prior written a
int rfbDeferUpdateTime = 40; /* ms */
+extern DevPrivateKeyRec rfbGCKeyRec;
+#define rfbGCKey (&rfbGCKeyRec)
+
+
/****************************************************************************/
/*
diff -urp xorg-server-1.9.3.orig//hw/vnc/sprite.c xorg-server-1.9.3/hw/vnc/sprite.c
--- xorg-server-1.9.3.orig//hw/vnc/sprite.c 2010-12-21 16:51:38.000000000 +0100
+++ xorg-server-1.9.3/hw/vnc/sprite.c 2010-12-21 18:21:32.000000000 +0100
@@ -114,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, \
@@ -147,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 = \
@@ -331,6 +332,9 @@ rfbSpriteInitialize (pScreen, cursorFunc
rfbSpriteScreenPtr pPriv;
VisualPtr pVisual;
+ if (!dixRegisterPrivateKey(rfbSpriteScreenKey, PRIVATE_SCREEN, 0))
+ return FALSE;
+
if (!dixRegisterPrivateKey(rfbSpriteGCKey, PRIVATE_CLIENT, sizeof(rfbSpriteGCRec)))
return FALSE;
diff -urp xorg-server-1.9.3.orig//hw/vnc/vncext.c xorg-server-1.9.3/hw/vnc/vncext.c
--- xorg-server-1.9.3.orig//hw/vnc/vncext.c 2010-12-21 16:51:38.000000000 +0100
+++ xorg-server-1.9.3/hw/vnc/vncext.c 2010-12-21 18:29:54.000000000 +0100
@@ -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,7 +763,11 @@ VncExtensionInit(void)
vncExtGeneration = serverGeneration;
+ // doesn't seem to be valid any more - mhopf 21.12.2010
// no allocation needed for screen privates
+ if (!dixRegisterPrivateKey(vncCreateScreenResourcesKey, PRIVATE_SCREEN, 0))
+ return;
+
if (!dixRegisterPrivateKey(rfbGCKey, PRIVATE_CLIENT, sizeof(rfbGCRec)))
return;

View File

@ -1,3 +1,35 @@
-------------------------------------------------------------------
Mon Dec 27 22:41:54 UTC 2010 - sndirsch@novell.com
- use-last-screen.patch
* Use last Screen section found to prefer xorg.conf (bnc #661536,
bfo #32430)
-------------------------------------------------------------------
Tue Dec 21 18:21:22 UTC 2010 - sndirsch@novell.com
- added xorg-server-xf4vnc-bug605015-vnc-umlauts.diff as patch, but
still disabled
-------------------------------------------------------------------
Tue Dec 21 18:08:15 UTC 2010 - mhopf@novell.com
- xorg-server-xf4vnc-fix-crash-on-193.diff
Fix vnc startup crashes (bnc #660208).
Reenabled build of Xvnc. Massive rendering errors, still.
-------------------------------------------------------------------
Tue Dec 21 02:51:19 UTC 2010 - sndirsch@novell.com
- bumped version number to 7.6_1.9.3
-------------------------------------------------------------------
Sun Dec 19 23:23:30 UTC 2010 - sndirsch@novell.com
- sync-fix.patch
* fixes the issue that gnome screensaver fadeout could not be
stopped (bnc #648851)
-------------------------------------------------------------------
Sun Dec 19 14:57:16 UTC 2010 - sndirsch@novell.com

View File

@ -1,5 +1,5 @@
#
# spec file for package xorg-x11-server (Version 7.5_1.9.3)
# spec file for package xorg-x11-server (Version 7.6_1.9.3)
#
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
@ -21,7 +21,7 @@
Name: xorg-x11-server
%define dirsuffix 1.9.3
%define vnc 0
%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)
%if %suse_version > 1120
@ -31,7 +31,7 @@ BuildRequires: libudev-devel
BuildRequires: libjpeg-devel
%endif
Url: http://xorg.freedesktop.org/
Version: 7.5_%{dirsuffix}
Version: 7.6_%{dirsuffix}
Release: 2
License: GPLv2+ ; MIT License (or similar)
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@ -79,7 +79,8 @@ 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-bug605015-vnc-umlauts.diff
Patch51: xorg-server-xf4vnc-bug605015-vnc-umlauts.diff
Patch52: xorg-server-xf4vnc-fix-crash-on-193.diff
%endif
Patch45: bug-197858_dpms.diff
Patch67: xorg-docs.diff
@ -118,6 +119,8 @@ Patch217: CVE-2010-2240-address_space_limit.patch
Patch218: CVE-2010-2240-tree_depth_limit.patch
Patch220: Use-external-tool-for-creating-backtraces-on-crashes.patch
Patch221: commit-5c6a2f9.diff
Patch222: sync-fix.patch
Patch223: use-last-screen.patch
%if %moblin
Patch300: moblin-use_preferred_mode_for_all_outputs.diff
%endif
@ -203,6 +206,7 @@ An X Window System server for Virtual Network Computing (VNC).
%patch49 -p0
%patch50 -p1
#%patch51 -p1
%patch52 -p1
chmod 755 hw/vnc/symlink-vnc.sh
%endif
%patch45 -p0
@ -246,6 +250,8 @@ popd
%patch218 -p1
%patch220 -p1
%patch221 -p1
%patch222 -p1
%patch223 -p1
%if %moblin
%patch300 -p1
%endif