mirror of
https://github.com/X11Libre/xserver.git
synced 2026-10-08 23:12:27 +00:00
xfree86: add general handler, port ACPI to it (bug #5665)
Add 'general' handler registration, which will not trigger DPMS when an event comes in. Make ACPI use this.
This commit is contained in:
parent
b5438f7fb2
commit
809e2841aa
3 changed files with 93 additions and 16 deletions
|
|
@ -163,7 +163,7 @@ lnxACPIOpen(void)
|
|||
|
||||
xf86PMGetEventFromOs = lnxACPIGetEventFromOs;
|
||||
xf86PMConfirmEventToOs = lnxACPIConfirmEventToOs;
|
||||
ACPIihPtr = xf86AddInputHandler(fd,xf86HandlePMEvents,NULL);
|
||||
ACPIihPtr = xf86AddGeneralHandler(fd,xf86HandlePMEvents,NULL);
|
||||
xf86MsgVerb(X_INFO,3,"Open ACPI successful (%s)\n", ACPI_SOCKET);
|
||||
|
||||
return lnxCloseACPI;
|
||||
|
|
@ -178,7 +178,7 @@ lnxCloseACPI(void)
|
|||
ErrorF("ACPI: Closing device\n");
|
||||
#endif
|
||||
if (ACPIihPtr) {
|
||||
fd = xf86RemoveInputHandler(ACPIihPtr);
|
||||
fd = xf86RemoveGeneralHandler(ACPIihPtr);
|
||||
shutdown(fd, 2);
|
||||
close(fd);
|
||||
ACPIihPtr = NULL;
|
||||
|
|
|
|||
Loading…
Reference in a new issue