Giter Site home page Giter Site logo

inputpipe's People

Contributors

g4bwy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

baraban artizirk

inputpipe's Issues

not working under arch linux

this patch fixes it for me

From f4ddd5d3e7583f693799bcc9256f0f9abc4ed400 Mon Sep 17 00:00:00 2001
From: Arti Zirk <[email protected]>
Date: Fri, 23 Jan 2015 15:32:55 +0200
Subject: [PATCH] fix

---
 Makefile     | 2 +-
 src/client.c | 6 ++++--
 src/packet.h | 2 +-
 src/server.c | 4 ++--
 4 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/Makefile b/Makefile
index 83b9bf2..466d46e 100644
--- a/Makefile
+++ b/Makefile
@@ -12,7 +12,7 @@ SERVER_OBJS = $(COMMON_OBJS) \
 CLIENT_OBJS = $(COMMON_OBJS) \
    src/client.o

-CFLAGS = -I uinput -I src -g
+CFLAGS = -I src -g

 all: $(BINS)

diff --git a/src/client.c b/src/client.c
index 80398c6..fabe3c3 100644
--- a/src/client.c
+++ b/src/client.c
@@ -41,7 +41,7 @@
 #include <getopt.h>
 #include <signal.h>

-#include <input.h>
+#include <linux/input.h>
 #include "inputpipe.h"
 #include "packet.h"

@@ -396,14 +396,16 @@ static int evdev_send_event(struct evdev *self, struct server *svr)

   compute_grab(self, &ev);

-  if (grab_devices && !(ev.type == EV_KEY && ev.code == MAGIC_GRAB_KEY)) {
+  if (!(ev.type == EV_KEY && ev.code == MAGIC_GRAB_KEY)) {
      /* Translate and send this event. If it's an event we think should
       * only be sent from app to device, assume it's an echo from
       * a write and discard it.
       */
+      
      hton_input_event(&ip_ev, &ev);
      if (is_output_event(&ev))
        return 0;
+
      packet_socket_write(svr->socket, IPIPE_EVENT, sizeof(ip_ev), &ip_ev);

      /* Does this device support synchronization events?
diff --git a/src/packet.h b/src/packet.h
index 23edc61..7d538c1 100644
--- a/src/packet.h
+++ b/src/packet.h
@@ -26,7 +26,7 @@

 #include <stdio.h>

-#include <input.h>
+#include <linux/input.h>
 #include "inputpipe.h"

 struct packet_socket {
diff --git a/src/server.c b/src/server.c
index 7c3109d..6cf9d1c 100644
--- a/src/server.c
+++ b/src/server.c
@@ -37,8 +37,8 @@
 #include <sys/select.h>
 #include <linux/tcp.h>

-#include <input.h>
-#include <uinput.h>
+#include <linux/input.h>
+#include <linux/uinput.h>
 #include "inputpipe.h"
 #include "packet.h"

--
libgit2 0.21.0

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.