summaryrefslogtreecommitdiff
path: root/os
diff options
context:
space:
mode:
authorDaniel Stone <daniel@fooishbar.org>2006-11-08 17:57:48 +0200
committerDaniel Stone <daniels@endtroducing.fooishbar.org>2006-11-08 18:10:40 +0200
commit66b2c9bd2dddf8f8410147ebf1de7a6c045d8249 (patch)
treeedb9875d65d461dd93e3bd05371532ea53c703bc /os
parent58653b676d68b731c046128eade8efff9ab61582 (diff)
add 'general socket' handler, port ACPI to use it
Add a general socket (not input device, but still need to be woken for it) handler to both the DIX and XFree86, and make XFree86's ACPI handling use it. This stops DPMS waking up every time an ACPI notification comes in.
Diffstat (limited to 'os')
-rw-r--r--os/connection.c22
1 files changed, 17 insertions, 5 deletions
diff --git a/os/connection.c b/os/connection.c
index 6ca4010e2..daad2ac8a 100644
--- a/os/connection.c
+++ b/os/connection.c
@@ -1048,21 +1048,33 @@ CloseDownConnection(ClientPtr client)
}
_X_EXPORT void
+AddGeneralSocket(int fd)
+{
+ FD_SET(fd, &AllSockets);
+ if (GrabInProgress)
+ FD_SET(fd, &SavedAllSockets);
+}
+
+_X_EXPORT void
AddEnabledDevice(int fd)
{
FD_SET(fd, &EnabledDevices);
- FD_SET(fd, &AllSockets);
+ AddGeneralSocket(fd);
+}
+
+_X_EXPORT void
+RemoveGeneralSocket(int fd)
+{
+ FD_CLR(fd, &AllSockets);
if (GrabInProgress)
- FD_SET(fd, &SavedAllSockets);
+ FD_CLR(fd, &SavedAllSockets);
}
_X_EXPORT void
RemoveEnabledDevice(int fd)
{
FD_CLR(fd, &EnabledDevices);
- FD_CLR(fd, &AllSockets);
- if (GrabInProgress)
- FD_CLR(fd, &SavedAllSockets);
+ RemoveGeneralSocket(fd);
}
/*****************