diff options
author | emersion <contact@emersion.fr> | 2018-11-13 07:53:43 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-13 07:53:43 +0100 |
commit | df7d4a71fb52d47279a93ee398220ff63d916ab7 (patch) | |
tree | 29d08a6cfdd92ed2b12ebf1139164fbb79f7ce78 /include/backend | |
parent | 4aff85cc8e6f90e60522a7a830424e41a6f06b77 (diff) | |
parent | d3ee69f76bbc8b71a79840c047fa7a6144ddc628 (diff) |
Merge pull request #1368 from ascent12/x11_backend
X11 backend improvements
Diffstat (limited to 'include/backend')
-rw-r--r-- | include/backend/x11.h | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/include/backend/x11.h b/include/backend/x11.h index 06803768..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; - -#if 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); |