|
|
|
@ -17,7 +17,7 @@ static void handle_tearing_controller_set_hint(struct wl_listener *listener,
|
|
|
|
|
void *data) {
|
|
|
|
|
struct sway_tearing_controller *controller =
|
|
|
|
|
wl_container_of(listener, controller, set_hint);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
struct sway_view *view = view_from_wlr_surface(
|
|
|
|
|
controller->tearing_control->surface);
|
|
|
|
|
if (view) {
|
|
|
|
@ -25,27 +25,27 @@ static void handle_tearing_controller_set_hint(struct wl_listener *listener,
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void handle_tearing_controller_destroy(struct wl_listener *listener,
|
|
|
|
|
static void handle_tearing_controller_destroy(struct wl_listener *listener,
|
|
|
|
|
void *data) {
|
|
|
|
|
struct sway_tearing_controller *controller =
|
|
|
|
|
struct sway_tearing_controller *controller =
|
|
|
|
|
wl_container_of(listener, controller, destroy);
|
|
|
|
|
wl_list_remove(&controller->link);
|
|
|
|
|
free(controller);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void handle_new_tearing_hint(struct wl_listener *listener,
|
|
|
|
|
void handle_new_tearing_hint(struct wl_listener *listener,
|
|
|
|
|
void *data) {
|
|
|
|
|
struct sway_server *server =
|
|
|
|
|
struct sway_server *server =
|
|
|
|
|
wl_container_of(listener, server, tearing_control_new_object);
|
|
|
|
|
struct wlr_tearing_control_v1 *tearing_control = data;
|
|
|
|
|
|
|
|
|
|
enum wp_tearing_control_v1_presentation_hint hint =
|
|
|
|
|
|
|
|
|
|
enum wp_tearing_control_v1_presentation_hint hint =
|
|
|
|
|
wlr_tearing_control_manager_v1_surface_hint_from_surface(
|
|
|
|
|
server->tearing_control_v1, tearing_control->surface);
|
|
|
|
|
sway_log(SWAY_DEBUG, "New presentation hint %d received for surface %p",
|
|
|
|
|
hint, tearing_control->surface);
|
|
|
|
|
|
|
|
|
|
struct sway_tearing_controller *controller =
|
|
|
|
|
struct sway_tearing_controller *controller =
|
|
|
|
|
calloc(1, sizeof(struct sway_tearing_controller));
|
|
|
|
|
if (!controller) {
|
|
|
|
|
return;
|
|
|
|
|