Skip to content

Commit

Permalink
Cleanup ouput chooser in wlr_screencast.c
Browse files Browse the repository at this point in the history
  • Loading branch information
columbarius committed Oct 8, 2020
1 parent 32b6d15 commit 8a9337a
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions src/screencast/wlr_screencast.c
Original file line number Diff line number Diff line change
Expand Up @@ -502,9 +502,18 @@ struct xdpw_wlr_output *wlr_output_chooser_dmenu(struct wl_list *output_list) {
struct xdpw_wlr_output *xdpw_wlr_output_chooser(struct wl_list *output_list) {

logprint(DEBUG, "wlroots: output chooser called");
return xdpw_wlr_output_chooser_slurp(output_list);
return xdpw_wlr_output_chooser_dmenu(output_list);
return NULL;
struct xdpw_wlr_output* (*chooser_functions[2])(struct wl_list*) = {
wlr_output_chooser_slurp,
wlr_output_chooser_dmenu,
};
struct xdpw_wlr_output *output;
for (int i = 0; i<2; i++) {
output = chooser_functions[i](output_list);
if (output != NULL) {
return output;
}
}
return output;
}

struct xdpw_wlr_output *xdpw_wlr_output_find_by_name(struct wl_list *output_list,
Expand Down

0 comments on commit 8a9337a

Please sign in to comment.