diff options
author | Drew DeVault <sir@cmpwn.com> | 2018-04-04 18:52:44 -0400 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2018-04-04 18:52:44 -0400 |
commit | 5d444b34f6af17894e2808c9d25948db625dabde (patch) | |
tree | 4702abb406a59fb8588cbd2019741e99d40bcbfe /swaylock/main.c | |
parent | exit() needs stdlib.h (diff) | |
download | sway-5d444b34f6af17894e2808c9d25948db625dabde.tar.gz sway-5d444b34f6af17894e2808c9d25948db625dabde.tar.zst sway-5d444b34f6af17894e2808c9d25948db625dabde.zip |
Address review feedback from @emersion
Diffstat (limited to 'swaylock/main.c')
-rw-r--r-- | swaylock/main.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/swaylock/main.c b/swaylock/main.c index 1eda3afc..1d522184 100644 --- a/swaylock/main.c +++ b/swaylock/main.c | |||
@@ -216,7 +216,8 @@ int main(int argc, char **argv) { | |||
216 | 216 | ||
217 | wl_list_init(&state.surfaces); | 217 | wl_list_init(&state.surfaces); |
218 | state.xkb.context = xkb_context_new(XKB_CONTEXT_NO_FLAGS); | 218 | state.xkb.context = xkb_context_new(XKB_CONTEXT_NO_FLAGS); |
219 | assert(state.display = wl_display_connect(NULL)); | 219 | state.display = wl_display_connect(NULL); |
220 | assert(state.display); | ||
220 | 221 | ||
221 | struct wl_registry *registry = wl_display_get_registry(state.display); | 222 | struct wl_registry *registry = wl_display_get_registry(state.display); |
222 | wl_registry_add_listener(registry, ®istry_listener, &state); | 223 | wl_registry_add_listener(registry, ®istry_listener, &state); |
@@ -236,8 +237,8 @@ int main(int argc, char **argv) { | |||
236 | wl_list_for_each(surface, &state.surfaces, link) { | 237 | wl_list_for_each(surface, &state.surfaces, link) { |
237 | surface->image = background_image; | 238 | surface->image = background_image; |
238 | 239 | ||
239 | assert(surface->surface = | 240 | surface->surface = wl_compositor_create_surface(state.compositor); |
240 | wl_compositor_create_surface(state.compositor)); | 241 | assert(surface->surface); |
241 | 242 | ||
242 | surface->layer_surface = zwlr_layer_shell_v1_get_layer_surface( | 243 | surface->layer_surface = zwlr_layer_shell_v1_get_layer_surface( |
243 | state.layer_shell, surface->surface, surface->output, | 244 | state.layer_shell, surface->surface, surface->output, |