Commit 915cc107 authored by Michel Dänzer's avatar Michel Dänzer Committed by Michel Dänzer

xwayland: Add xwl_window_create_frame_callback helper

This will be used by the following changes. No functional change
intended.
Reviewed-by: default avatarOlivier Fourdan <ofourdan@redhat.com>
(cherry picked from commit f80eea05)
parent 94dad4f0
......@@ -747,6 +747,14 @@ static const struct wl_callback_listener frame_listener = {
frame_callback
};
void
xwl_window_create_frame_callback(struct xwl_window *xwl_window)
{
xwl_window->frame_callback = wl_surface_frame(xwl_window->surface);
wl_callback_add_listener(xwl_window->frame_callback, &frame_listener,
xwl_window);
}
static Bool
xwl_destroy_window(WindowPtr window)
{
......@@ -817,9 +825,7 @@ xwl_window_post_damage(struct xwl_window *xwl_window)
box->x2 - box->x1, box->y2 - box->y1);
}
xwl_window->frame_callback = wl_surface_frame(xwl_window->surface);
wl_callback_add_listener(xwl_window->frame_callback, &frame_listener, xwl_window);
xwl_window_create_frame_callback(xwl_window);
DamageEmpty(window_get_damage(xwl_window->window));
}
......
......@@ -378,6 +378,8 @@ struct xwl_output {
Bool xdg_output_done;
};
void xwl_window_create_frame_callback(struct xwl_window *xwl_window);
void xwl_sync_events (struct xwl_screen *xwl_screen);
Bool xwl_screen_init_cursor(struct xwl_screen *xwl_screen);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment