mirror of
https://github.com/debauchee/barrier.git
synced 2026-02-09 13:15:33 +08:00
fixes to avoid update delays.
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
#include <netinet/tcp.h> // FIXME -- for disabling nagle algorithm
|
||||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
#include <netdb.h>
|
||||
@@ -29,6 +30,13 @@ CUnixTCPSocket::CUnixTCPSocket() : m_fd(-1),
|
||||
::close(m_fd);
|
||||
throw XSocketCreate(::strerror(errno));
|
||||
}
|
||||
|
||||
// turn off Nagle algorithm. we send lots of really short messages.
|
||||
struct protoent* p = getprotobyname("tcp");
|
||||
if (p) {
|
||||
int on = 1;
|
||||
setsockopt(m_fd, p->p_proto, TCP_NODELAY, &on, sizeof(on));
|
||||
}
|
||||
}
|
||||
|
||||
CUnixTCPSocket::CUnixTCPSocket(int fd) : m_fd(fd),
|
||||
|
||||
@@ -199,7 +199,8 @@ void CXScreen::onMouseMove(SInt32 x, SInt32 y)
|
||||
assert(m_display != NULL);
|
||||
assert(m_primary == false);
|
||||
|
||||
XTestFakeMotionEvent(m_display, m_screen, x, y, CurrentTime);
|
||||
::XTestFakeMotionEvent(m_display, m_screen, x, y, CurrentTime);
|
||||
::XSync(m_display, False);
|
||||
}
|
||||
|
||||
void CXScreen::onMouseWheel(SInt32)
|
||||
|
||||
Reference in New Issue
Block a user