mirror of
https://gitlab.freedesktop.org/wayland/wayland.git
synced 2025-11-02 09:01:39 -05:00
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:
parent
d1c58d60f6
commit
5ee1a60f1a
6 changed files with 145 additions and 185 deletions
5
window.c
5
window.c
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue