sway/lock: handle mode in output commit handler

This commit is contained in:
Simon Zeni 2022-12-01 15:38:33 -05:00 committed by Simon Ser
parent aa03a8fcb5
commit 6b3245ac77
1 changed files with 0 additions and 10 deletions

View File

@ -13,7 +13,6 @@ struct sway_session_lock_surface {
struct wl_listener map;
struct wl_listener destroy;
struct wl_listener surface_commit;
struct wl_listener output_mode;
struct wl_listener output_commit;
struct wl_listener output_destroy;
};
@ -40,12 +39,6 @@ static void handle_surface_commit(struct wl_listener *listener, void *data) {
output_damage_surface(surf->output, 0, 0, surf->surface, false);
}
static void handle_output_mode(struct wl_listener *listener, void *data) {
struct sway_session_lock_surface *surf = wl_container_of(listener, surf, output_mode);
wlr_session_lock_surface_v1_configure(surf->lock_surface,
surf->output->width, surf->output->height);
}
static void handle_output_commit(struct wl_listener *listener, void *data) {
struct wlr_output_event_commit *event = data;
struct sway_session_lock_surface *surf = wl_container_of(listener, surf, output_commit);
@ -76,7 +69,6 @@ static void destroy_lock_surface(struct sway_session_lock_surface *surf) {
wl_list_remove(&surf->map.link);
wl_list_remove(&surf->destroy.link);
wl_list_remove(&surf->surface_commit.link);
wl_list_remove(&surf->output_mode.link);
wl_list_remove(&surf->output_commit.link);
wl_list_remove(&surf->output_destroy.link);
output_damage_whole(surf->output);
@ -115,8 +107,6 @@ static void handle_new_surface(struct wl_listener *listener, void *data) {
wl_signal_add(&lock_surface->events.destroy, &surf->destroy);
surf->surface_commit.notify = handle_surface_commit;
wl_signal_add(&surf->surface->events.commit, &surf->surface_commit);
surf->output_mode.notify = handle_output_mode;
wl_signal_add(&output->wlr_output->events.mode, &surf->output_mode);
surf->output_commit.notify = handle_output_commit;
wl_signal_add(&output->wlr_output->events.commit, &surf->output_commit);
surf->output_destroy.notify = handle_output_destroy;