Rewrite input event delivery path.

Instead of having the input driver push the events into the core server,
only to have the server call back out to the compositor hooks, the driver now
just calls the compositor directly.  The input drivers are always dependent on
the type of compositor anyway so there was no point in passing the events
through the server.  Now the server is only involved when it's time to actually
send the events to the clients.
This commit is contained in:
Kristian Høgsberg 2008-12-11 23:18:45 -05:00
parent d1c58d60f6
commit 5ee1a60f1a
6 changed files with 145 additions and 185 deletions

View file

@ -31,6 +31,7 @@
#include <cairo.h>
#include <glib.h>
#include <linux/input.h>
#include "wayland-client.h"
#include "wayland-glib.h"
@ -272,7 +273,7 @@ event_handler(struct wl_display *display,
location = LOCATION_OUTSIDE;
}
if (button == 0 && state == 1) {
if (button == BTN_LEFT && state == 1) {
switch (location) {
case LOCATION_INTERIOR:
window->drag_x = window->x - window->last_x;
@ -288,7 +289,7 @@ event_handler(struct wl_display *display,
window->state = WINDOW_STABLE;
break;
}
} else if (button == 0 && state == 0) {
} else if (button == BTN_LEFT && state == 0) {
window->state = WINDOW_STABLE;
}
} else if (opcode == 2) {