diff options
author | Manuel Stoeckl <code@mstoeckl.com> | 2021-02-03 21:45:51 -0500 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2021-02-04 09:49:06 +0100 |
commit | 8f2cd3236f0f7e0ae8fcd9d1447cc583d17de5c5 (patch) | |
tree | 518f1d6660fdb6527c0e4524589315b00febbe73 /swaybar | |
parent | cb3c7276324b5b0862088df9ffe5498998edae91 (diff) |
Make Wayland request listeners static const when possible
Diffstat (limited to 'swaybar')
-rw-r--r-- | swaybar/bar.c | 6 | ||||
-rw-r--r-- | swaybar/input.c | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/swaybar/bar.c b/swaybar/bar.c index 231c1ad7..74c1924f 100644 --- a/swaybar/bar.c +++ b/swaybar/bar.c @@ -90,7 +90,7 @@ static void layer_surface_closed(void *_output, swaybar_output_free(output); } -struct zwlr_layer_surface_v1_listener layer_surface_listener = { +static const struct zwlr_layer_surface_v1_listener layer_surface_listener = { .configure = layer_surface_configure, .closed = layer_surface_closed, }; @@ -230,7 +230,7 @@ static void output_scale(void *data, struct wl_output *wl_output, } } -struct wl_output_listener output_listener = { +static const struct wl_output_listener output_listener = { .geometry = output_geometry, .mode = output_mode, .done = output_done, @@ -307,7 +307,7 @@ static void xdg_output_handle_description(void *data, } } -struct zxdg_output_v1_listener xdg_output_listener = { +static const struct zxdg_output_v1_listener xdg_output_listener = { .logical_position = xdg_output_handle_logical_position, .logical_size = xdg_output_handle_logical_size, .done = xdg_output_handle_done, diff --git a/swaybar/input.c b/swaybar/input.c index 4fe6dd93..67f3522a 100644 --- a/swaybar/input.c +++ b/swaybar/input.c @@ -339,7 +339,7 @@ static void wl_pointer_axis_discrete(void *data, struct wl_pointer *wl_pointer, seat->axis[axis].discrete_steps += abs(discrete); } -static struct wl_pointer_listener pointer_listener = { +static const struct wl_pointer_listener pointer_listener = { .enter = wl_pointer_enter, .leave = wl_pointer_leave, .motion = wl_pointer_motion, |