aboutsummaryrefslogtreecommitdiff
path: root/include/backend
diff options
context:
space:
mode:
Diffstat (limited to 'include/backend')
-rw-r--r--include/backend/wayland.h11
-rw-r--r--include/backend/x11.h26
2 files changed, 18 insertions, 19 deletions
diff --git a/include/backend/wayland.h b/include/backend/wayland.h
index 47585d9e..dbc309ca 100644
--- a/include/backend/wayland.h
+++ b/include/backend/wayland.h
@@ -2,10 +2,12 @@
#define BACKEND_WAYLAND_H
#include <stdbool.h>
+
#include <wayland-client.h>
#include <wayland-egl.h>
#include <wayland-server.h>
#include <wayland-util.h>
+
#include <wlr/backend/wayland.h>
#include <wlr/render/egl.h>
#include <wlr/render/wlr_renderer.h>
@@ -32,6 +34,7 @@ struct wlr_wl_backend {
struct wl_shm *shm;
struct wl_seat *seat;
struct wl_pointer *pointer;
+ struct wl_keyboard *keyboard;
struct wlr_wl_pointer *current_pointer;
char *seat_name;
};
@@ -78,13 +81,11 @@ struct wlr_wl_pointer {
struct wl_listener output_destroy;
};
-struct wlr_wl_backend *get_wl_backend_from_backend(
- struct wlr_backend *wlr_backend);
-void poll_wl_registry(struct wlr_wl_backend *backend);
+struct wlr_wl_backend *get_wl_backend_from_backend(struct wlr_backend *backend);
void update_wl_output_cursor(struct wlr_wl_output *output);
struct wlr_wl_pointer *pointer_get_wl(struct wlr_pointer *wlr_pointer);
-void create_wl_pointer(struct wl_pointer *wl_pointer,
- struct wlr_wl_output *output);
+void create_wl_pointer(struct wl_pointer *wl_pointer, struct wlr_wl_output *output);
+void create_wl_keyboard(struct wl_keyboard *wl_keyboard, struct wlr_wl_backend *wl);
extern const struct wl_seat_listener seat_listener;
diff --git a/include/backend/x11.h b/include/backend/x11.h
index 37e3e4b6..1a8341f6 100644
--- a/include/backend/x11.h
+++ b/include/backend/x11.h
@@ -2,14 +2,17 @@
#define BACKEND_X11_H
#include <stdbool.h>
+
+#include <X11/Xlib-xcb.h>
#include <wayland-server.h>
-#include <wlr/config.h>
+#include <xcb/xcb.h>
+
#include <wlr/backend/x11.h>
+#include <wlr/config.h>
#include <wlr/interfaces/wlr_input_device.h>
#include <wlr/interfaces/wlr_output.h>
#include <wlr/render/egl.h>
-#include <X11/Xlib-xcb.h>
-#include <xcb/xcb.h>
+#include <wlr/render/wlr_renderer.h>
#define XCB_EVENT_RESPONSE_TYPE_MASK 0x7f
@@ -30,6 +33,8 @@ struct wlr_x11_output {
struct wl_event_source *frame_timer;
int frame_delay;
+
+ bool cursor_hidden;
};
struct wlr_x11_backend {
@@ -38,7 +43,7 @@ struct wlr_x11_backend {
bool started;
Display *xlib_conn;
- xcb_connection_t *xcb_conn;
+ xcb_connection_t *xcb;
xcb_screen_t *screen;
size_t requested_outputs;
@@ -61,14 +66,7 @@ struct wlr_x11_backend {
// The time we last received an event
xcb_timestamp_t time;
- // A blank cursor
- xcb_cursor_t cursor;
-
-#ifdef WLR_HAS_XCB_XKB
- bool xkb_supported;
- uint8_t xkb_base_event;
- uint8_t xkb_base_error;
-#endif
+ uint8_t xinput_opcode;
struct wl_listener display_destroy;
};
@@ -82,8 +80,8 @@ extern const struct wlr_keyboard_impl keyboard_impl;
extern const struct wlr_pointer_impl pointer_impl;
extern const struct wlr_input_device_impl input_device_impl;
-void handle_x11_input_event(struct wlr_x11_backend *x11,
- xcb_generic_event_t *event);
+void handle_x11_xinput_event(struct wlr_x11_backend *x11,
+ xcb_ge_generic_event_t *event);
void update_x11_pointer_position(struct wlr_x11_output *output,
xcb_timestamp_t time);