From c3c2cd908b1e409a0d08571846e63d571454e8ed16fdd7b50e134c3ca00b23dc Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Mon, 29 Jan 2007 16:36:20 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/xorg-x11-server?expand=0&rev=13 --- bug-197858_dpms.diff | 95 +++++++++++++++++++++++++++++++++++++++++ xorg-x11-server.changes | 7 +++ xorg-x11-server.spec | 8 +++- 3 files changed, 109 insertions(+), 1 deletion(-) create mode 100644 bug-197858_dpms.diff diff --git a/bug-197858_dpms.diff b/bug-197858_dpms.diff new file mode 100644 index 0000000..be15b33 --- /dev/null +++ b/bug-197858_dpms.diff @@ -0,0 +1,95 @@ +--- os/WaitFor.c.orig 2007-01-26 15:53:27.000000000 +0100 ++++ os/WaitFor.c 2007-01-29 11:24:14.000000000 +0100 +@@ -144,6 +144,7 @@ static OsTimerPtr timers = NULL; + * For more info on ClientsWithInput, see ReadRequestFromClient(). + * pClientsReady is an array to store ready client->index values into. + *****************/ ++volatile fd_set tmp_set; + + int + WaitForSomething(int *pClientsReady) +@@ -298,10 +299,9 @@ WaitForSomething(int *pClientsReady) + if (expired) + return 0; + } +- } ++ } + else +- { +- fd_set tmp_set; ++ { + + if (*checkForInput[0] == *checkForInput[1]) { + if (timers) +@@ -338,7 +338,8 @@ WaitForSomething(int *pClientsReady) + QueueWorkProc(EstablishNewConnections, NULL, + (pointer)&LastSelectMask); + #ifdef DPMSExtension +- if (XFD_ANYSET (&devicesReadable) && (DPMSPowerLevel != DPMSModeOn)) ++ XFD_ANDSET(&tmp_set, &devicesReadable, &EnabledDevices); ++ if (XFD_ANYSET (&tmp_set) && (DPMSPowerLevel != DPMSModeOn)) + DPMSSet(DPMSModeOn); + #endif + if (XFD_ANYSET (&devicesReadable) || XFD_ANYSET (&clientsReadable)) +--- hw/xfree86/common/xf86Events.c.orig 2006-11-13 19:59:23.000000000 +0100 ++++ hw/xfree86/common/xf86Events.c 2007-01-29 12:34:40.000000000 +0100 +@@ -155,6 +155,10 @@ extern void (*xf86OSPMClose)(void); + + static void xf86VTSwitch(void); + ++static fd_set *inputDevices = NULL; ++static void SetEnabledDevice(int fd); ++#define UnsetEnabledDevice(x) FD_CLR(x,inputDevices) ++ + /* + * Allow arbitrary drivers or other XFree86 code to register with our main + * Wakeup handler. +@@ -1664,8 +1668,10 @@ xf86AddInputHandler(int fd, InputHandler + { + IHPtr ih = addInputHandler(fd, proc, data); + +- if (ih) ++ if (ih) { + AddEnabledDevice(fd); ++ SetEnabledDevice(fd); ++ } + return ih; + } + +@@ -1708,8 +1714,10 @@ xf86RemoveInputHandler(pointer handler) + ih = handler; + fd = ih->fd; + +- if (ih->fd >= 0) ++ if (ih->fd >= 0) { + RemoveEnabledDevice(ih->fd); ++ UnsetEnabledDevice(ih->fd); ++ } + removeInputHandler(ih); + + return fd; +@@ -1772,7 +1780,7 @@ xf86EnableInputHandler(pointer handler) + + ih = handler; + ih->enabled = TRUE; +- if (ih->fd >= 0) ++ if (ih->fd >= 0 && FD_ISSET(ih->fd, inputDevices)) + AddEnabledDevice(ih->fd); + } + +@@ -1831,6 +1839,15 @@ xf86ReloadInputDevs(int sig) + return; + } + ++static void SetEnabledDevice(int x) ++{ ++ if (!inputDevices) { ++ inputDevices = xcalloc(sizeof (fd_set), 1); ++ FD_ZERO(inputDevices); ++ }; ++ FD_SET(x,inputDevices); ++} ++ + #ifdef WSCONS_SUPPORT + + /* XXX Currently XKB is mandatory. */ diff --git a/xorg-x11-server.changes b/xorg-x11-server.changes index 814fae7..3344531 100644 --- a/xorg-x11-server.changes +++ b/xorg-x11-server.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Mon Jan 29 16:40:43 CET 2007 - sndirsch@suse.de + +- bug-197858_dpms.diff: + * finally fixed "X server wakes up on any ACPI event" issue + (Bug #197858) + ------------------------------------------------------------------- Thu Jan 25 17:56:57 CET 2007 - sndirsch@suse.de diff --git a/xorg-x11-server.spec b/xorg-x11-server.spec index 62d67ca..4f1203a 100644 --- a/xorg-x11-server.spec +++ b/xorg-x11-server.spec @@ -21,7 +21,7 @@ BuildRequires: libjpeg-devel URL: http://xorg.freedesktop.org/ %define EXPERIMENTAL 0 Version: 7.2 -Release: 48 +Release: 49 License: X11/MIT BuildRoot: %{_tmppath}/%{name}-%{version}-build Group: System/X11/Servers/XF86_4 @@ -81,6 +81,7 @@ Patch41: loadmod-bug197195.diff Patch42: bug227111-ddc_screensize.diff Patch43: bug-211314_mesa-context.diff Patch44: bug-211314_p_drawable_privclean.diff +Patch45: bug-197858_dpms.diff Patch334: p_pci-domain.diff Patch357: p_pci-ce-x.diff @@ -175,6 +176,7 @@ pushd ../Mesa %patch43 -p0 popd %patch44 -p0 +%patch45 -p0 %build autoreconf -fi @@ -498,6 +500,10 @@ exit 0 %endif %changelog -n xorg-x11-server +* Mon Jan 29 2007 - sndirsch@suse.de +- bug-197858_dpms.diff: + * finally fixed "X server wakes up on any ACPI event" issue + (Bug #197858) * Thu Jan 25 2007 - sndirsch@suse.de - bug-211314_p_drawable_privclean.diff: * fixed for cleaning up pointers