summaryrefslogtreecommitdiffstats
path: root/sway/handlers.c
diff options
context:
space:
mode:
Diffstat (limited to 'sway/handlers.c')
-rw-r--r--sway/handlers.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/sway/handlers.c b/sway/handlers.c
index 23a994b4..3abe2fca 100644
--- a/sway/handlers.c
+++ b/sway/handlers.c
@@ -123,6 +123,11 @@ static void update_background_geometries(wlc_handle output) {
123 123
124static bool handle_input_created(struct libinput_device *device) { 124static bool handle_input_created(struct libinput_device *device) {
125 const char *identifier = libinput_dev_unique_id(device); 125 const char *identifier = libinput_dev_unique_id(device);
126 if (!identifier) {
127 sway_log(L_ERROR, "Unable to allocate unique name for input device %p",
128 device);
129 return true;
130 }
126 sway_log(L_INFO, "Found input device (%s)", identifier); 131 sway_log(L_INFO, "Found input device (%s)", identifier);
127 132
128 list_add(input_devices, device); 133 list_add(input_devices, device);
@@ -402,6 +407,10 @@ static bool handle_view_created(wlc_handle handle) {
402 } else { 407 } else {
403 swayc_t *output = swayc_parent_by_type(focused, C_OUTPUT); 408 swayc_t *output = swayc_parent_by_type(focused, C_OUTPUT);
404 wlc_handle *h = malloc(sizeof(wlc_handle)); 409 wlc_handle *h = malloc(sizeof(wlc_handle));
410 if (!h) {
411 sway_log(L_ERROR, "Unable to allocate window handle, view handler bailing out");
412 return true;
413 }
405 *h = handle; 414 *h = handle;
406 sway_log(L_DEBUG, "Adding unmanaged window %p to %p", h, output->unmanaged); 415 sway_log(L_DEBUG, "Adding unmanaged window %p to %p", h, output->unmanaged);
407 list_add(output->unmanaged, h); 416 list_add(output->unmanaged, h);