aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/backend/x11.h11
1 files changed, 5 insertions, 6 deletions
diff --git a/include/backend/x11.h b/include/backend/x11.h
index e628e4cb..59cb8e44 100644
--- a/include/backend/x11.h
+++ b/include/backend/x11.h
@@ -6,6 +6,7 @@
#include <X11/Xlib-xcb.h>
#include <wayland-server-core.h>
#include <xcb/xcb.h>
+#include <xcb/present.h>
#include <wlr/backend/x11.h>
#include <wlr/config.h>
@@ -16,8 +17,6 @@
#define XCB_EVENT_RESPONSE_TYPE_MASK 0x7f
-#define X11_DEFAULT_REFRESH (60 * 1000) // 60 Hz
-
struct wlr_x11_backend;
struct wlr_x11_output {
@@ -35,8 +34,7 @@ struct wlr_x11_output {
struct wlr_input_device touch_dev;
struct wl_list touchpoints; // wlr_x11_touchpoint::link
- struct wl_event_source *frame_timer;
- int frame_delay;
+ xcb_present_event_t present_context;
bool cursor_hidden;
};
@@ -78,6 +76,7 @@ struct wlr_x11_backend {
xcb_timestamp_t time;
uint8_t xinput_opcode;
+ uint8_t present_opcode;
struct wl_listener display_destroy;
};
@@ -97,7 +96,7 @@ void handle_x11_xinput_event(struct wlr_x11_backend *x11,
void update_x11_pointer_position(struct wlr_x11_output *output,
xcb_timestamp_t time);
-void handle_x11_configure_notify(struct wlr_x11_output *output,
- xcb_configure_notify_event_t *event);
+void handle_x11_present_event(struct wlr_x11_backend *x11,
+ xcb_present_generic_event_t *ev);
#endif