View | Details | Raw Unified | Return to bug 197858
Collapse All | Expand All

(-)os/WaitFor.c.orig (-4 / +5 lines)
Lines 144-149 static OsTimerPtr timers = NULL; Link Here
144
 *     For more info on ClientsWithInput, see ReadRequestFromClient().
144
 *     For more info on ClientsWithInput, see ReadRequestFromClient().
145
 *     pClientsReady is an array to store ready client->index values into.
145
 *     pClientsReady is an array to store ready client->index values into.
146
 *****************/
146
 *****************/
147
volatile fd_set tmp_set;
147
148
148
int
149
int
149
WaitForSomething(int *pClientsReady)
150
WaitForSomething(int *pClientsReady)
Lines 298-307 WaitForSomething(int *pClientsReady) Link Here
298
                if (expired)
299
                if (expired)
299
                    return 0;
300
                    return 0;
300
	    }
301
	    }
301
	}
302
	} 
302
	else
303
	else
303
	{
304
	 {
304
	    fd_set tmp_set;
305
305
306
	    if (*checkForInput[0] == *checkForInput[1]) {
306
	    if (*checkForInput[0] == *checkForInput[1]) {
307
	        if (timers)
307
	        if (timers)
Lines 338-344 WaitForSomething(int *pClientsReady) Link Here
338
		QueueWorkProc(EstablishNewConnections, NULL,
338
		QueueWorkProc(EstablishNewConnections, NULL,
339
			      (pointer)&LastSelectMask);
339
			      (pointer)&LastSelectMask);
340
#ifdef DPMSExtension
340
#ifdef DPMSExtension
341
	    if (XFD_ANYSET (&devicesReadable) && (DPMSPowerLevel != DPMSModeOn))
341
	    XFD_ANDSET(&tmp_set, &devicesReadable, &EnabledDevices);
342
	    if (XFD_ANYSET (&tmp_set) && (DPMSPowerLevel != DPMSModeOn))
342
		DPMSSet(DPMSModeOn);
343
		DPMSSet(DPMSModeOn);
343
#endif
344
#endif
344
	    if (XFD_ANYSET (&devicesReadable) || XFD_ANYSET (&clientsReadable))
345
	    if (XFD_ANYSET (&devicesReadable) || XFD_ANYSET (&clientsReadable))
(-)hw/xfree86/common/xf86Events.c.orig (-3 / +20 lines)
Lines 155-160 extern void (*xf86OSPMClose)(void); Link Here
155
155
156
static void xf86VTSwitch(void);
156
static void xf86VTSwitch(void);
157
157
158
static  fd_set *inputDevices = NULL;
159
static  void SetEnabledDevice(int fd);
160
#define UnsetEnabledDevice(x) FD_CLR(x,inputDevices)
161
158
/*
162
/*
159
 * Allow arbitrary drivers or other XFree86 code to register with our main
163
 * Allow arbitrary drivers or other XFree86 code to register with our main
160
 * Wakeup handler.
164
 * Wakeup handler.
Lines 1664-1671 xf86AddInputHandler(int fd, InputHandler Link Here
1664
{   
1668
{   
1665
    IHPtr ih = addInputHandler(fd, proc, data);
1669
    IHPtr ih = addInputHandler(fd, proc, data);
1666
1670
1667
    if (ih)
1671
    if (ih) {
1668
        AddEnabledDevice(fd);
1672
        AddEnabledDevice(fd);
1673
	SetEnabledDevice(fd);
1674
    }
1669
    return ih;
1675
    return ih;
1670
}
1676
}
1671
1677
Lines 1708-1715 xf86RemoveInputHandler(pointer handler) Link Here
1708
    ih = handler;
1714
    ih = handler;
1709
    fd = ih->fd;
1715
    fd = ih->fd;
1710
    
1716
    
1711
    if (ih->fd >= 0)
1717
    if (ih->fd >= 0) {
1712
	RemoveEnabledDevice(ih->fd);
1718
	RemoveEnabledDevice(ih->fd);
1719
	UnsetEnabledDevice(ih->fd);
1720
    }
1713
    removeInputHandler(ih);
1721
    removeInputHandler(ih);
1714
1722
1715
    return fd;
1723
    return fd;
Lines 1772-1778 xf86EnableInputHandler(pointer handler) Link Here
1772
1780
1773
    ih = handler;
1781
    ih = handler;
1774
    ih->enabled = TRUE;
1782
    ih->enabled = TRUE;
1775
    if (ih->fd >= 0)
1783
    if (ih->fd >= 0 && FD_ISSET(ih->fd, inputDevices))
1776
	AddEnabledDevice(ih->fd);
1784
	AddEnabledDevice(ih->fd);
1777
}
1785
}
1778
1786
Lines 1831-1836 xf86ReloadInputDevs(int sig) Link Here
1831
  return;
1839
  return;
1832
}
1840
}
1833
1841
1842
static void SetEnabledDevice(int x)
1843
{ 
1844
  if (!inputDevices) { 
1845
      inputDevices = xcalloc(sizeof (fd_set), 1); 
1846
      FD_ZERO(inputDevices);
1847
  };
1848
  FD_SET(x,inputDevices);
1849
}
1850
1834
#ifdef WSCONS_SUPPORT
1851
#ifdef WSCONS_SUPPORT
1835
1852
1836
/* XXX Currently XKB is mandatory. */
1853
/* XXX Currently XKB is mandatory. */

Return to bug 197858