Commit f80eea05 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>
parent 46e5236b
......@@ -1092,6 +1092,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)
{
......@@ -1177,9 +1185,7 @@ xwl_window_post_damage(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);
xwl_window_create_frame_callback(xwl_window);
wl_surface_commit(xwl_window->surface);
DamageEmpty(window_get_damage(xwl_window->window));
......
......@@ -418,6 +418,7 @@ struct xwl_screen *xwl_screen_get(ScreenPtr screen);
Bool xwl_screen_has_resolution_change_emulation(struct xwl_screen *xwl_screen);
struct xwl_output *xwl_screen_get_first_output(struct xwl_screen *xwl_screen);
void xwl_screen_check_resolution_change_emulation(struct xwl_screen *xwl_screen);
void xwl_window_create_frame_callback(struct xwl_window *xwl_window);
Bool xwl_window_has_viewport_enabled(struct xwl_window *xwl_window);
Bool xwl_window_is_toplevel(WindowPtr window);
......
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