Skip to content

Commit

Permalink
sway/lock: handle mode in output commit handler
Browse files Browse the repository at this point in the history
  • Loading branch information
bl4ckb0ne authored and emersion committed Dec 1, 2022
1 parent aa03a8f commit 6b3245a
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions sway/lock.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};
Expand All @@ -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);
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 6b3245a

Please sign in to comment.