aboutsummaryrefslogtreecommitdiffstats
path: root/swaynag
diff options
context:
space:
mode:
authorLibravatar Manuel Stoeckl <code@mstoeckl.com>2021-02-03 21:45:51 -0500
committerLibravatar Simon Ser <contact@emersion.fr>2021-02-04 09:49:06 +0100
commit8f2cd3236f0f7e0ae8fcd9d1447cc583d17de5c5 (patch)
tree518f1d6660fdb6527c0e4524589315b00febbe73 /swaynag
parentDeclare all struct cmd_handler arrays const (diff)
downloadsway-8f2cd3236f0f7e0ae8fcd9d1447cc583d17de5c5.tar.gz
sway-8f2cd3236f0f7e0ae8fcd9d1447cc583d17de5c5.tar.zst
sway-8f2cd3236f0f7e0ae8fcd9d1447cc583d17de5c5.zip
Make Wayland request listeners static const when possible
Diffstat (limited to 'swaynag')
-rw-r--r--swaynag/swaynag.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/swaynag/swaynag.c b/swaynag/swaynag.c
index d9bec368..46b90e03 100644
--- a/swaynag/swaynag.c
+++ b/swaynag/swaynag.c
@@ -103,7 +103,7 @@ static void layer_surface_closed(void *data,
103 swaynag_destroy(swaynag); 103 swaynag_destroy(swaynag);
104} 104}
105 105
106static struct zwlr_layer_surface_v1_listener layer_surface_listener = { 106static const struct zwlr_layer_surface_v1_listener layer_surface_listener = {
107 .configure = layer_surface_configure, 107 .configure = layer_surface_configure,
108 .closed = layer_surface_closed, 108 .closed = layer_surface_closed,
109}; 109};
@@ -124,7 +124,7 @@ static void surface_enter(void *data, struct wl_surface *surface,
124 }; 124 };
125} 125}
126 126
127static struct wl_surface_listener surface_listener = { 127static const struct wl_surface_listener surface_listener = {
128 .enter = surface_enter, 128 .enter = surface_enter,
129 .leave = nop, 129 .leave = nop,
130}; 130};
@@ -263,7 +263,7 @@ static void wl_pointer_axis(void *data, struct wl_pointer *wl_pointer,
263 render_frame(swaynag); 263 render_frame(swaynag);
264} 264}
265 265
266static struct wl_pointer_listener pointer_listener = { 266static const struct wl_pointer_listener pointer_listener = {
267 .enter = wl_pointer_enter, 267 .enter = wl_pointer_enter,
268 .leave = nop, 268 .leave = nop,
269 .motion = wl_pointer_motion, 269 .motion = wl_pointer_motion,
@@ -289,7 +289,7 @@ static void seat_handle_capabilities(void *data, struct wl_seat *wl_seat,
289 } 289 }
290} 290}
291 291
292const struct wl_seat_listener seat_listener = { 292static const struct wl_seat_listener seat_listener = {
293 .capabilities = seat_handle_capabilities, 293 .capabilities = seat_handle_capabilities,
294 .name = nop, 294 .name = nop,
295}; 295};
@@ -305,7 +305,7 @@ static void output_scale(void *data, struct wl_output *output,
305 } 305 }
306} 306}
307 307
308static struct wl_output_listener output_listener = { 308static const struct wl_output_listener output_listener = {
309 .geometry = nop, 309 .geometry = nop,
310 .mode = nop, 310 .mode = nop,
311 .done = nop, 311 .done = nop,
@@ -327,7 +327,7 @@ static void xdg_output_handle_name(void *data,
327 swaynag_output->swaynag->querying_outputs--; 327 swaynag_output->swaynag->querying_outputs--;
328} 328}
329 329
330static struct zxdg_output_v1_listener xdg_output_listener = { 330static const struct zxdg_output_v1_listener xdg_output_listener = {
331 .logical_position = nop, 331 .logical_position = nop,
332 .logical_size = nop, 332 .logical_size = nop,
333 .done = nop, 333 .done = nop,