diff --git a/bug-197858_dpms.diff b/bug-197858_dpms.diff index be15b33..9da2ce6 100644 --- a/bug-197858_dpms.diff +++ b/bug-197858_dpms.diff @@ -31,65 +31,71 @@ 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); +--- hw/xfree86/common/xf86Events.c.orig_1 2007-02-01 10:18:02.000000000 +0100 ++++ hw/xfree86/common/xf86Events.c 2007-02-01 10:43:54.000000000 +0100 +@@ -164,6 +164,7 @@ typedef struct x_IHRec { + InputHandlerProc ihproc; + pointer data; + Bool enabled; ++ Bool is_input; + struct x_IHRec * next; + } IHRec, *IHPtr; - static void xf86VTSwitch(void); +@@ -1526,8 +1527,12 @@ xf86VTSwitch() + for (i = 0; i < xf86NumScreens; i++) + xf86Screens[i]->LeaveVT(i, 0); -+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 +- for (ih = InputHandlers; ih; ih = ih->next) +- xf86DisableInputHandler(ih); ++ for (ih = InputHandlers; ih; ih = ih->next) { ++ if (ih->is_input) ++ xf86DisableInputHandler(ih); ++ else ++ xf86DisableGeneralHandler(ih); ++ } + xf86AccessLeave(); /* We need this here, otherwise */ + xf86AccessLeaveState(); /* console won't be restored */ + +@@ -1563,9 +1568,12 @@ xf86VTSwitch() + pInfo = pInfo->next; + } + #endif /* !__UNIXOS2__ */ +- for (ih = InputHandlers; ih; ih = ih->next) +- xf86EnableInputHandler(ih); +- ++ for (ih = InputHandlers; ih; ih = ih->next) { ++ if (ih->is_input) ++ xf86EnableInputHandler(ih); ++ else ++ xf86EnableGeneralHandler(ih); ++ } + xf86UnblockSIGIO(prevSIGIO); + + } else { +@@ -1626,8 +1634,12 @@ xf86VTSwitch() + } + #endif /* !__UNIXOS2__ */ + +- for (ih = InputHandlers; ih; ih = ih->next) +- xf86EnableInputHandler(ih); ++ for (ih = InputHandlers; ih; ih = ih->next) { ++ if (ih->is_input) ++ xf86EnableInputHandler(ih); ++ else ++ xf86EnableGeneralHandler(ih); ++ } + + xf86UnblockSIGIO(prevSIGIO); + } +@@ -1664,8 +1676,10 @@ xf86AddInputHandler(int fd, InputHandler { IHPtr ih = addInputHandler(fd, proc, data); - if (ih) + if (ih) { AddEnabledDevice(fd); -+ SetEnabledDevice(fd); ++ ih->is_input = TRUE; + } 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 3344531..9d6d9a4 100644 --- a/xorg-x11-server.changes +++ b/xorg-x11-server.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu Feb 1 11:03:39 CET 2007 - sndirsch@suse.de + +- improved bug-197858_dpms.diff to fix Xserver crash (Bug #197858) + ------------------------------------------------------------------- Mon Jan 29 16:40:43 CET 2007 - sndirsch@suse.de diff --git a/xorg-x11-server.spec b/xorg-x11-server.spec index 4f1203a..61eadce 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: 49 +Release: 50 License: X11/MIT BuildRoot: %{_tmppath}/%{name}-%{version}-build Group: System/X11/Servers/XF86_4 @@ -500,6 +500,8 @@ exit 0 %endif %changelog -n xorg-x11-server +* Thu Feb 01 2007 - sndirsch@suse.de +- improved bug-197858_dpms.diff to fix Xserver crash (Bug #197858) * Mon Jan 29 2007 - sndirsch@suse.de - bug-197858_dpms.diff: * finally fixed "X server wakes up on any ACPI event" issue