rpms/xorg-x11-server/OLPC-2 xserver-1.3.0-idletime.patch, NONE, 1.1 xorg-x11-server.spec, 1.231, 1.232

Adam Jackson (ajax) fedora-extras-commits at redhat.com
Wed Jul 11 17:29:41 UTC 2007


Author: ajax

Update of /cvs/pkgs/rpms/xorg-x11-server/OLPC-2
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv4042

Modified Files:
	xorg-x11-server.spec 
Added Files:
	xserver-1.3.0-idletime.patch 
Log Message:
* Wed Jul 11 2007 Adam Jackson <ajax at redhat.com> 1.3.0.0-13.1
- Test of exa-firstpixel-tweak.patch


xserver-1.3.0-idletime.patch:

--- NEW FILE xserver-1.3.0-idletime.patch ---
commit 7e2c935920cafadbd87c351f1a3239932864fb90
Author: Fredrik Höglund <fredrik at kde.org>
Date:   Fri May 18 20:06:14 2007 +0200

    Add a new IDLETIME system sync counter.
    
    This counter exposes the time in milliseconds since the last
    input event. Clients such as screen savers and power managers
    can set an alarm on this counter to find out when the idle time
    reaches a certain value, without having to poll the server.

diff --git a/Xext/sync.c b/Xext/sync.c
index c5441a1..6fc2dcc 100644
--- a/Xext/sync.c
+++ b/Xext/sync.c
@@ -243,6 +243,11 @@ SyncInitServerTime(
     void
 );
 
+static void
+SyncInitIdleTime(
+    void
+);
+
 static void 
 SyncResetProc(
     ExtensionEntry * /* extEntry */
@@ -2400,6 +2405,7 @@ SyncExtensionInit(INITARGS)
      * because there is always a servertime counter.
      */
     SyncInitServerTime();
+    SyncInitIdleTime();
 
 #ifdef DEBUG
     fprintf(stderr, "Sync Extension %d.%d\n",
@@ -2520,3 +2526,116 @@ SyncInitServerTime(void)
 			    ServertimeQueryValue, ServertimeBracketValues);
     pnext_time = NULL;
 }
+
+
+
+/*
+ * IDLETIME implementation
+ */
+
+static pointer IdleTimeCounter;
+static XSyncValue *pIdleTimeValueLess;
+static XSyncValue *pIdleTimeValueGreater;
+
+static void
+IdleTimeQueryValue (pointer pCounter, CARD64 *pValue_return)
+{
+    CARD32 idle = GetTimeInMillis() - lastDeviceEventTime.milliseconds;
+    XSyncIntsToValue (pValue_return, idle, 0);
+}
+
+static void
+IdleTimeBlockHandler (pointer env,
+                      struct timeval **wt,
+                      pointer LastSelectMask)
+{
+    XSyncValue idle;
+
+    if (!pIdleTimeValueLess && !pIdleTimeValueGreater)
+	return;
+
+    IdleTimeQueryValue (NULL, &idle);
+
+    if (pIdleTimeValueLess &&
+        XSyncValueLessOrEqual (idle, *pIdleTimeValueLess))
+    {
+	AdjustWaitForDelay (wt, 0);
+    }
+    else if (pIdleTimeValueGreater)
+    {
+	unsigned long timeout = 0;
+
+	if (XSyncValueLessThan (idle, *pIdleTimeValueGreater))
+	{
+	    XSyncValue value;
+	    Bool overflow;
+
+	    XSyncValueSubtract (&value, *pIdleTimeValueGreater,
+	                        idle, &overflow);
+	    timeout = XSyncValueLow32 (value);
+	}
+
+	AdjustWaitForDelay (wt, timeout);
+    }
+}
+
+static void
+IdleTimeWakeupHandler (pointer env,
+                       int rc,
+                       pointer LastSelectMask)
+{
+    XSyncValue idle;
+
+    if (!pIdleTimeValueLess && !pIdleTimeValueGreater)
+	return;
+
+    IdleTimeQueryValue (NULL, &idle);
+
+    if ((pIdleTimeValueGreater &&
+         XSyncValueGreaterThan (idle, *pIdleTimeValueGreater)) ||
+        (pIdleTimeValueLess && XSyncValueLessThan (idle, *pIdleTimeValueLess)))
+    {
+	SyncChangeCounter (IdleTimeCounter, idle);
+    }
+}
+
+static void
+IdleTimeBracketValues (pointer pCounter,
+                       CARD64 *pbracket_less,
+                       CARD64 *pbracket_greater)
+{
+    Bool registered = (pIdleTimeValueLess || pIdleTimeValueGreater);
+
+    if (registered && !pbracket_less && !pbracket_greater)
+    {
+	RemoveBlockAndWakeupHandlers(IdleTimeBlockHandler,
+	                             IdleTimeWakeupHandler,
+	                             NULL);
+    }
+    else if (!registered && (pbracket_less || pbracket_greater))
+    {
+	RegisterBlockAndWakeupHandlers(IdleTimeBlockHandler,
+	                               IdleTimeWakeupHandler,
+	                               NULL);
+    }
+
+    pIdleTimeValueGreater = pbracket_greater;
+    pIdleTimeValueLess    = pbracket_less;
+}
+
+static void
+SyncInitIdleTime (void)
+{
+    CARD64 resolution;
+    XSyncValue idle;
+
+    IdleTimeQueryValue (NULL, &idle);
+    XSyncIntToValue (&resolution, 4);
+
+    IdleTimeCounter = SyncCreateSystemCounter ("IDLETIME", idle, resolution,
+                                               XSyncCounterUnrestricted,
+                                               IdleTimeQueryValue,
+                                               IdleTimeBracketValues);
+
+    pIdleTimeValueLess = pIdleTimeValueGreater = NULL;
+}


Index: xorg-x11-server.spec
===================================================================
RCS file: /cvs/pkgs/rpms/xorg-x11-server/OLPC-2/xorg-x11-server.spec,v
retrieving revision 1.231
retrieving revision 1.232
diff -u -r1.231 -r1.232
--- xorg-x11-server.spec	11 Jun 2007 21:27:27 -0000	1.231
+++ xorg-x11-server.spec	11 Jul 2007 17:29:03 -0000	1.232
@@ -9,7 +9,7 @@
 Summary:   X.Org X11 X server
 Name:      xorg-x11-server
 Version:   1.3.0.0
-Release:   9%{?dist}
+Release:   13.1%{?dist}
 URL:       http://www.x.org
 License:   MIT/X11
 Group:     User Interface/X
@@ -65,6 +65,7 @@
 Patch2007:  xserver-1.3.0-randr12-config-hack.patch
 Patch2008:  xserver-1.3.0-randrama-no-zero-screens.patch
 Patch2009:  xserver-1.3.0-arm-iopl.patch
+Patch2010:  xserver-1.3.0-idletime.patch
 
 # assorted PCI layer shenanigans.  oh the pain.
 Patch2500:  xorg-x11-server-1.2.99-unbreak-domain.patch
@@ -74,6 +75,8 @@
 Patch2504:  xserver-1.3.0-domain-obiwan.patch
 Patch2505:  xserver-1.3.0-pci-device-enable.patch
 
+Patch3000: exa-firstpixel-tweak.patch
+
 %define moduledir	%{_libdir}/xorg/modules
 %define drimoduledir	%{_libdir}/dri
 %define sdkdir		%{_includedir}/xorg
@@ -136,7 +139,6 @@
 BuildRequires: libXaw-devel
 BuildRequires: libXfixes-devel
 
-BuildRequires: xorg-x11-font-utils >= 1.0.0-1
 BuildRequires: mesa-libGL-devel >= 6.5.2
 BuildRequires: mesa-source >= 6.5.2
 # XXX silly...
@@ -147,6 +149,9 @@
 
 BuildRequires: libselinux-devel
 
+# Make sure libXfont has the catalogue FPE
+Requires: libXfont >= 1.2.9
+
 # Make sure we pull ABI compatible drivers.
 Conflicts: xorg-x11-drv-ati < 6.6.1
 Conflicts: xorg-x11-drv-i810 < 1.6.0
@@ -174,6 +179,9 @@
 # virtuals.  XXX fix the xkbcomp fork() upstream.
 Requires: xkbdata xkbcomp
 Obsoletes: XFree86 xorg-x11
+# These drivers were dropped in F7 for being broken, so uninstall them.
+Obsoletes: xorg-x11-drv-elo2300 <= 1.1.0-2.fc7
+Obsoletes: xorg-x11-drv-joystick <= 1.1.0-2.fc7
 
 %description Xorg
 X.org X11 is an open source implementation of the X Window System.  It
@@ -314,6 +322,7 @@
 %patch2007 -p1 -b .randrconfig
 %patch2008 -p1 -b .randrama-zero-screens
 %patch2009 -p1 -b .arm
+%patch2010 -p1 -b .idletime
 
 %patch2500 -p1 -b .unbreak-domains
 %patch2501 -p1 -b .pci-bus-count
@@ -324,6 +333,12 @@
 
 %build
 
+%if 0%{?fedora} == 7
+%define default_font_path "unix/:7100,catalogue:/etc/X11/fontpath.d,built-ins"
+%else
+%define default_font_path "catalogue:/etc/X11/fontpath.d,built-ins"
+%endif
+
 # --with-rgb-path should be superfluous now ?
 # --with-pie ?
 aclocal ; automake -a ; autoconf
@@ -338,7 +353,7 @@
 	--enable-xcsecurity \
 	--enable-xevie \
 	--with-int10=x86emu \
-	--with-default-font-path="unix/:7100,built-ins" \
+	--with-default-font-path=%{default_font_path} \
 	--with-module-dir=%{moduledir} \
 	--with-os-name="Fedora Core 7" \
 	--with-os-vendor="Red Hat, Inc." \
@@ -347,7 +362,6 @@
 	--with-rgb-path=%{_datadir}/X11/rgb \
 	--disable-xorgcfg \
 	--enable-install-libxf86config \
-	--with-fontdir=%(pkg-config --variable=fontdir fontutil) \
 	--with-mesa-source=%{_datadir}/mesa/source \
 %if %{with_hw_servers}
 	--enable-dri \
@@ -427,25 +441,30 @@
 %if %{with_hw_servers}
 %pre Xorg
 {
-  pushd /etc/X11
-  for configfile in XF86Config XF86Config-4 ; do
-    if [ -r $configfile ]; then
-      if [ -r xorg.conf ]; then
-        mv -f $configfile $configfile.obsoleted
-    else
-        mv -f $configfile xorg.conf
-      fi
-    fi
-  done
-  configfile="xorg.conf"
-  if [ -r xorg.conf -a -w xorg.conf ]; then
+    pushd /etc/X11
+
+    for configfile in XF86Config XF86Config-4 ; do
+	if [ -r $configfile ]; then
+	    if [ -r xorg.conf ]; then
+		mv -f $configfile $configfile.obsoleted
+	    else
+		mv -f $configfile xorg.conf
+	    fi
+	fi
+    done
+
+    [ -e xorg.conf ] || return 0
+
     perl -p -i -e 's/^.*Load.*"(pex5|xie|xtt).*\n$"//gi' xorg.conf
     perl -p -i -e 's/^\s*Driver(.*)"keyboard"/Driver\1"kbd"/gi' xorg.conf
     perl -p -i -e 's/^.*Option.*"XkbRules".*"(xfree86|xorg)".*\n$//gi' xorg.conf
     perl -p -i -e 's#^\s*RgbPath.*$##gi' xorg.conf
-    perl -p -i -e 's#^\s*ModulePath.*$##gi' xorg.conf
-  fi
-  popd
+    # lame, the nvidia driver needs to override this
+    if ! grep -q 'ModulePath.*nvidia' xorg.conf ; then
+      perl -p -i -e 's#^\s*ModulePath.*$##gi' xorg.conf
+    fi
+
+    popd
 } &> /dev/null || :
 %endif
 
@@ -579,6 +598,25 @@
 
 
 %changelog
+* Wed Jul 11 2007 Adam Jackson <ajax at redhat.com> 1.3.0.0-13.1
+- Test of exa-firstpixel-tweak.patch
+
+* Mon Jul 02 2007 Adam Jackson <ajax at redhat.com> 1.3.0.0-13
+- Add IDLETIME sync counter for great powersaving justice.
+- Conditionalise default font path for F7 spec compatibility.
+
+* Wed Jun 27 2007 Adam Jackson <ajax at redhat.com> 1.3.0.0-12
+- Tweak %%post Xorg slightly to not demolish ModulePath lines installed by
+  the nvidia driver.  (#244359)
+
+* Wed Jun 27 2007 Adam Jackson <ajax at redhat.com> 1.3.0.0-11
+- Obsolete the joystick and elo2300 drivers, they never worked and shouldn't
+  be installed.
+
+* Fri Jun 22 2007 Kristian Høgsberg <krh at redhat.com> - 1.3.0.0-10
+- Change the default font path to catalogue:/etc/X11/fontpath.d,built-ins
+- Drop build dependency xorg-x11-font-utils.
+
 * Mon Jun 11 2007 Adam Jackson <ajax at redhat.com> 1.3.0.0-9
 - xserver-1.3.0-reput-video.patch: Don't crash when minimizing an Xv
   window. (#241214)




More information about the fedora-extras-commits mailing list