From 1211a81aad18bbc4d9e8fb9973238ad8e7e1f688 Mon Sep 17 00:00:00 2001 From: M Stoeckl Date: Sun, 20 Jan 2019 13:51:12 -0500 Subject: Replace wlr_log with sway_log This commit mostly duplicates the wlr_log functions, although with a sway_* prefix. (This is very similar to PR #2009.) However, the logging function no longer needs to be replaceable, so sway_log_init's second argument is used to set the exit callback for sway_abort. wlr_log_init is still invoked in sway/main.c This commit makes it easier to remove the wlroots dependency for the helper programs swaymsg, swaybg, swaybar, and swaynag. --- sway/input/cursor.c | 4 +-- sway/input/input-manager.c | 84 +++++++++++++++++++++++----------------------- sway/input/keyboard.c | 10 +++--- sway/input/seat.c | 32 +++++++++--------- 4 files changed, 65 insertions(+), 65 deletions(-) (limited to 'sway/input') diff --git a/sway/input/cursor.c b/sway/input/cursor.c index 35683f06..bf9bf2da 100644 --- a/sway/input/cursor.c +++ b/sway/input/cursor.c @@ -713,7 +713,7 @@ static uint32_t wl_axis_to_button(struct wlr_event_pointer_axis *event) { case WLR_AXIS_ORIENTATION_HORIZONTAL: return event->delta < 0 ? SWAY_SCROLL_LEFT : SWAY_SCROLL_RIGHT; default: - wlr_log(WLR_DEBUG, "Unknown axis orientation"); + sway_log(SWAY_DEBUG, "Unknown axis orientation"); return 0; } } @@ -1004,7 +1004,7 @@ static void handle_request_set_cursor(struct wl_listener *listener, // TODO: check cursor mode if (focused_client == NULL || event->seat_client->client != focused_client) { - wlr_log(WLR_DEBUG, "denying request to set cursor from unfocused client"); + sway_log(SWAY_DEBUG, "denying request to set cursor from unfocused client"); return; } diff --git a/sway/input/input-manager.c b/sway/input/input-manager.c index 9fff5f48..2b4a99d4 100644 --- a/sway/input/input-manager.c +++ b/sway/input/input-manager.c @@ -62,7 +62,7 @@ char *input_device_get_identifier(struct wlr_input_device *device) { int len = snprintf(NULL, 0, fmt, vendor, product, name) + 1; char *identifier = malloc(len); if (!identifier) { - wlr_log(WLR_ERROR, "Unable to allocate unique input device name"); + sway_log(SWAY_ERROR, "Unable to allocate unique input device name"); return NULL; } @@ -98,7 +98,7 @@ static bool input_has_seat_fallback_configuration(void) { void input_manager_verify_fallback_seat(void) { struct sway_seat *seat = NULL; if (!input_has_seat_fallback_configuration()) { - wlr_log(WLR_DEBUG, "no fallback seat config - creating default"); + sway_log(SWAY_DEBUG, "no fallback seat config - creating default"); seat = input_manager_get_default_seat(); struct seat_config *sc = new_seat_config(seat->wlr_seat->name); sc->fallback = true; @@ -124,11 +124,11 @@ static void input_manager_libinput_config_keyboard( } libinput_device = wlr_libinput_get_device_handle(wlr_device); - wlr_log(WLR_DEBUG, "input_manager_libinput_config_keyboard(%s)", + sway_log(SWAY_DEBUG, "input_manager_libinput_config_keyboard(%s)", ic->identifier); if (ic->send_events != INT_MIN) { - wlr_log(WLR_DEBUG, "libinput_config_keyboard(%s) send_events_set_mode(%d)", + sway_log(SWAY_DEBUG, "libinput_config_keyboard(%s) send_events_set_mode(%d)", ic->identifier, ic->send_events); log_libinput_config_status(libinput_device_config_send_events_set_mode( libinput_device, ic->send_events)); @@ -148,7 +148,7 @@ static void input_manager_libinput_reset_keyboard( uint32_t send_events = libinput_device_config_send_events_get_default_mode(libinput_device); - wlr_log(WLR_DEBUG, "libinput_reset_keyboard(%s) send_events_set_mode(%d)", + sway_log(SWAY_DEBUG, "libinput_reset_keyboard(%s) send_events_set_mode(%d)", input_device->identifier, send_events); log_libinput_config_status(libinput_device_config_send_events_set_mode( libinput_device, send_events)); @@ -165,11 +165,11 @@ static void input_manager_libinput_config_touch( } libinput_device = wlr_libinput_get_device_handle(wlr_device); - wlr_log(WLR_DEBUG, "input_manager_libinput_config_touch(%s)", + sway_log(SWAY_DEBUG, "input_manager_libinput_config_touch(%s)", ic->identifier); if (ic->send_events != INT_MIN) { - wlr_log(WLR_DEBUG, "libinput_config_touch(%s) send_events_set_mode(%d)", + sway_log(SWAY_DEBUG, "libinput_config_touch(%s) send_events_set_mode(%d)", ic->identifier, ic->send_events); log_libinput_config_status(libinput_device_config_send_events_set_mode( libinput_device, ic->send_events)); @@ -189,7 +189,7 @@ static void input_manager_libinput_reset_touch( uint32_t send_events = libinput_device_config_send_events_get_default_mode(libinput_device); - wlr_log(WLR_DEBUG, "libinput_reset_touch(%s) send_events_set_mode(%d)", + sway_log(SWAY_DEBUG, "libinput_reset_touch(%s) send_events_set_mode(%d)", input_device->identifier, send_events); log_libinput_config_status(libinput_device_config_send_events_set_mode( libinput_device, send_events)); @@ -206,30 +206,30 @@ static void input_manager_libinput_config_pointer( } libinput_device = wlr_libinput_get_device_handle(wlr_device); - wlr_log(WLR_DEBUG, "input_manager_libinput_config_pointer(%s)", + sway_log(SWAY_DEBUG, "input_manager_libinput_config_pointer(%s)", ic->identifier); if (ic->accel_profile != INT_MIN) { - wlr_log(WLR_DEBUG, "libinput_config_pointer(%s) accel_set_profile(%d)", + sway_log(SWAY_DEBUG, "libinput_config_pointer(%s) accel_set_profile(%d)", ic->identifier, ic->accel_profile); log_libinput_config_status(libinput_device_config_accel_set_profile( libinput_device, ic->accel_profile)); } if (ic->click_method != INT_MIN) { - wlr_log(WLR_DEBUG, "libinput_config_pointer(%s) click_set_method(%d)", + sway_log(SWAY_DEBUG, "libinput_config_pointer(%s) click_set_method(%d)", ic->identifier, ic->click_method); log_libinput_config_status(libinput_device_config_click_set_method( libinput_device, ic->click_method)); } if (ic->drag != INT_MIN) { - wlr_log(WLR_DEBUG, + sway_log(SWAY_DEBUG, "libinput_config_pointer(%s) tap_set_drag_enabled(%d)", ic->identifier, ic->drag); log_libinput_config_status(libinput_device_config_tap_set_drag_enabled( libinput_device, ic->drag)); } if (ic->drag_lock != INT_MIN) { - wlr_log(WLR_DEBUG, + sway_log(SWAY_DEBUG, "libinput_config_pointer(%s) tap_set_drag_lock_enabled(%d)", ic->identifier, ic->drag_lock); log_libinput_config_status( @@ -237,20 +237,20 @@ static void input_manager_libinput_config_pointer( libinput_device, ic->drag_lock)); } if (ic->dwt != INT_MIN) { - wlr_log(WLR_DEBUG, "libinput_config_pointer(%s) dwt_set_enabled(%d)", + sway_log(SWAY_DEBUG, "libinput_config_pointer(%s) dwt_set_enabled(%d)", ic->identifier, ic->dwt); log_libinput_config_status(libinput_device_config_dwt_set_enabled( libinput_device, ic->dwt)); } if (ic->left_handed != INT_MIN) { - wlr_log(WLR_DEBUG, + sway_log(SWAY_DEBUG, "libinput_config_pointer(%s) left_handed_set_enabled(%d)", ic->identifier, ic->left_handed); log_libinput_config_status(libinput_device_config_left_handed_set( libinput_device, ic->left_handed)); } if (ic->middle_emulation != INT_MIN) { - wlr_log(WLR_DEBUG, + sway_log(SWAY_DEBUG, "libinput_config_pointer(%s) middle_emulation_set_enabled(%d)", ic->identifier, ic->middle_emulation); log_libinput_config_status( @@ -258,7 +258,7 @@ static void input_manager_libinput_config_pointer( libinput_device, ic->middle_emulation)); } if (ic->natural_scroll != INT_MIN) { - wlr_log(WLR_DEBUG, + sway_log(SWAY_DEBUG, "libinput_config_pointer(%s) natural_scroll_set_enabled(%d)", ic->identifier, ic->natural_scroll); log_libinput_config_status( @@ -266,37 +266,37 @@ static void input_manager_libinput_config_pointer( libinput_device, ic->natural_scroll)); } if (ic->pointer_accel != FLT_MIN) { - wlr_log(WLR_DEBUG, "libinput_config_pointer(%s) accel_set_speed(%f)", + sway_log(SWAY_DEBUG, "libinput_config_pointer(%s) accel_set_speed(%f)", ic->identifier, ic->pointer_accel); log_libinput_config_status(libinput_device_config_accel_set_speed( libinput_device, ic->pointer_accel)); } if (ic->scroll_button != INT_MIN) { - wlr_log(WLR_DEBUG, "libinput_config_pointer(%s) scroll_set_button(%d)", + sway_log(SWAY_DEBUG, "libinput_config_pointer(%s) scroll_set_button(%d)", ic->identifier, ic->scroll_button); log_libinput_config_status(libinput_device_config_scroll_set_button( libinput_device, ic->scroll_button)); } if (ic->scroll_method != INT_MIN) { - wlr_log(WLR_DEBUG, "libinput_config_pointer(%s) scroll_set_method(%d)", + sway_log(SWAY_DEBUG, "libinput_config_pointer(%s) scroll_set_method(%d)", ic->identifier, ic->scroll_method); log_libinput_config_status(libinput_device_config_scroll_set_method( libinput_device, ic->scroll_method)); } if (ic->send_events != INT_MIN) { - wlr_log(WLR_DEBUG, "libinput_config_pointer(%s) send_events_set_mode(%d)", + sway_log(SWAY_DEBUG, "libinput_config_pointer(%s) send_events_set_mode(%d)", ic->identifier, ic->send_events); log_libinput_config_status(libinput_device_config_send_events_set_mode( libinput_device, ic->send_events)); } if (ic->tap != INT_MIN) { - wlr_log(WLR_DEBUG, "libinput_config_pointer(%s) tap_set_enabled(%d)", + sway_log(SWAY_DEBUG, "libinput_config_pointer(%s) tap_set_enabled(%d)", ic->identifier, ic->tap); log_libinput_config_status(libinput_device_config_tap_set_enabled( libinput_device, ic->tap)); } if (ic->tap_button_map != INT_MIN) { - wlr_log(WLR_DEBUG, "libinput_config_pointer(%s) tap_set_button_map(%d)", + sway_log(SWAY_DEBUG, "libinput_config_pointer(%s) tap_set_button_map(%d)", ic->identifier, ic->tap_button_map); log_libinput_config_status(libinput_device_config_tap_set_button_map( libinput_device, ic->tap_button_map)); @@ -316,21 +316,21 @@ static void input_manager_libinput_reset_pointer( enum libinput_config_accel_profile accel_profile = libinput_device_config_accel_get_default_profile(libinput_device); - wlr_log(WLR_DEBUG, "libinput_reset_pointer(%s) accel_set_profile(%d)", + sway_log(SWAY_DEBUG, "libinput_reset_pointer(%s) accel_set_profile(%d)", input_device->identifier, accel_profile); log_libinput_config_status(libinput_device_config_accel_set_profile( libinput_device, accel_profile)); enum libinput_config_click_method click_method = libinput_device_config_click_get_default_method(libinput_device); - wlr_log(WLR_DEBUG, "libinput_reset_pointer(%s) click_set_method(%d)", + sway_log(SWAY_DEBUG, "libinput_reset_pointer(%s) click_set_method(%d)", input_device->identifier, click_method); log_libinput_config_status(libinput_device_config_click_set_method( libinput_device, click_method)); enum libinput_config_drag_state drag = libinput_device_config_tap_get_default_drag_enabled(libinput_device); - wlr_log(WLR_DEBUG, "libinput_reset_pointer(%s) tap_set_drag_enabled(%d)", + sway_log(SWAY_DEBUG, "libinput_reset_pointer(%s) tap_set_drag_enabled(%d)", input_device->identifier, drag); log_libinput_config_status(libinput_device_config_tap_set_drag_enabled( libinput_device, drag)); @@ -338,7 +338,7 @@ static void input_manager_libinput_reset_pointer( enum libinput_config_drag_lock_state drag_lock = libinput_device_config_tap_get_default_drag_lock_enabled( libinput_device); - wlr_log(WLR_DEBUG, + sway_log(SWAY_DEBUG, "libinput_reset_pointer(%s) tap_set_drag_lock_enabled(%d)", input_device->identifier, drag_lock); log_libinput_config_status( @@ -347,14 +347,14 @@ static void input_manager_libinput_reset_pointer( enum libinput_config_dwt_state dwt = libinput_device_config_dwt_get_default_enabled(libinput_device); - wlr_log(WLR_DEBUG, "libinput_reset_pointer(%s) dwt_set_enabled(%d)", + sway_log(SWAY_DEBUG, "libinput_reset_pointer(%s) dwt_set_enabled(%d)", input_device->identifier, dwt); log_libinput_config_status(libinput_device_config_dwt_set_enabled( libinput_device, dwt)); int left_handed = libinput_device_config_left_handed_get_default(libinput_device); - wlr_log(WLR_DEBUG, + sway_log(SWAY_DEBUG, "libinput_reset_pointer(%s) left_handed_set_enabled(%d)", input_device->identifier, left_handed); log_libinput_config_status(libinput_device_config_left_handed_set( @@ -363,7 +363,7 @@ static void input_manager_libinput_reset_pointer( enum libinput_config_middle_emulation_state middle_emulation = libinput_device_config_middle_emulation_get_default_enabled( libinput_device); - wlr_log(WLR_DEBUG, + sway_log(SWAY_DEBUG, "libinput_reset_pointer(%s) middle_emulation_set_enabled(%d)", input_device->identifier, middle_emulation); log_libinput_config_status( @@ -373,7 +373,7 @@ static void input_manager_libinput_reset_pointer( int natural_scroll = libinput_device_config_scroll_get_default_natural_scroll_enabled( libinput_device); - wlr_log(WLR_DEBUG, + sway_log(SWAY_DEBUG, "libinput_reset_pointer(%s) natural_scroll_set_enabled(%d)", input_device->identifier, natural_scroll); log_libinput_config_status( @@ -382,42 +382,42 @@ static void input_manager_libinput_reset_pointer( double pointer_accel = libinput_device_config_accel_get_default_speed(libinput_device); - wlr_log(WLR_DEBUG, "libinput_reset_pointer(%s) accel_set_speed(%f)", + sway_log(SWAY_DEBUG, "libinput_reset_pointer(%s) accel_set_speed(%f)", input_device->identifier, pointer_accel); log_libinput_config_status(libinput_device_config_accel_set_speed( libinput_device, pointer_accel)); uint32_t scroll_button = libinput_device_config_scroll_get_default_button(libinput_device); - wlr_log(WLR_DEBUG, "libinput_reset_pointer(%s) scroll_set_button(%d)", + sway_log(SWAY_DEBUG, "libinput_reset_pointer(%s) scroll_set_button(%d)", input_device->identifier, scroll_button); log_libinput_config_status(libinput_device_config_scroll_set_button( libinput_device, scroll_button)); enum libinput_config_scroll_method scroll_method = libinput_device_config_scroll_get_default_method(libinput_device); - wlr_log(WLR_DEBUG, "libinput_reset_pointer(%s) scroll_set_method(%d)", + sway_log(SWAY_DEBUG, "libinput_reset_pointer(%s) scroll_set_method(%d)", input_device->identifier, scroll_method); log_libinput_config_status(libinput_device_config_scroll_set_method( libinput_device, scroll_method)); uint32_t send_events = libinput_device_config_send_events_get_default_mode(libinput_device); - wlr_log(WLR_DEBUG, "libinput_reset_pointer(%s) send_events_set_mode(%d)", + sway_log(SWAY_DEBUG, "libinput_reset_pointer(%s) send_events_set_mode(%d)", input_device->identifier, send_events); log_libinput_config_status(libinput_device_config_send_events_set_mode( libinput_device, send_events)); enum libinput_config_tap_state tap = libinput_device_config_tap_get_default_enabled(libinput_device); - wlr_log(WLR_DEBUG, "libinput_reset_pointer(%s) tap_set_enabled(%d)", + sway_log(SWAY_DEBUG, "libinput_reset_pointer(%s) tap_set_enabled(%d)", input_device->identifier, tap); log_libinput_config_status(libinput_device_config_tap_set_enabled( libinput_device, tap)); enum libinput_config_tap_button_map tap_button_map = libinput_device_config_tap_get_button_map(libinput_device); - wlr_log(WLR_DEBUG, "libinput_reset_pointer(%s) tap_set_button_map(%d)", + sway_log(SWAY_DEBUG, "libinput_reset_pointer(%s) tap_set_button_map(%d)", input_device->identifier, tap_button_map); log_libinput_config_status(libinput_device_config_tap_set_button_map( libinput_device, tap_button_map)); @@ -432,7 +432,7 @@ static void handle_device_destroy(struct wl_listener *listener, void *data) { return; } - wlr_log(WLR_DEBUG, "removing device: '%s'", + sway_log(SWAY_DEBUG, "removing device: '%s'", input_device->identifier); struct sway_seat *seat = NULL; @@ -462,7 +462,7 @@ static void handle_new_input(struct wl_listener *listener, void *data) { input_device->identifier = input_device_get_identifier(device); wl_list_insert(&input->devices, &input_device->link); - wlr_log(WLR_DEBUG, "adding device: '%s'", + sway_log(SWAY_DEBUG, "adding device: '%s'", input_device->identifier); if (input_device->wlr_device->type == WLR_INPUT_DEVICE_POINTER || @@ -504,7 +504,7 @@ static void handle_new_input(struct wl_listener *listener, void *data) { } if (!added) { - wlr_log(WLR_DEBUG, + sway_log(SWAY_DEBUG, "device '%s' is not configured on any seats", input_device->identifier); } @@ -554,7 +554,7 @@ void handle_virtual_keyboard(struct wl_listener *listener, void *data) { input_device->identifier = input_device_get_identifier(device); wl_list_insert(&input_manager->devices, &input_device->link); - wlr_log(WLR_DEBUG, "adding virtual keyboard: '%s'", + sway_log(SWAY_DEBUG, "adding virtual keyboard: '%s'", input_device->identifier); wl_signal_add(&device->events.destroy, &input_device->device_destroy); @@ -660,7 +660,7 @@ void input_manager_reset_all_inputs() { void input_manager_apply_seat_config(struct seat_config *seat_config) { - wlr_log(WLR_DEBUG, "applying seat config for seat %s", seat_config->name); + sway_log(SWAY_DEBUG, "applying seat config for seat %s", seat_config->name); if (strcmp(seat_config->name, "*") == 0) { struct sway_seat *seat = NULL; wl_list_for_each(seat, &server.input->seats, link) { diff --git a/sway/input/keyboard.c b/sway/input/keyboard.c index 2ea796a9..c1fc60f7 100644 --- a/sway/input/keyboard.c +++ b/sway/input/keyboard.c @@ -126,7 +126,7 @@ static void get_active_binding(const struct sway_shortcut_state *state, if (*current_binding && *current_binding != binding && strcmp((*current_binding)->input, binding->input) == 0) { - wlr_log(WLR_DEBUG, "encountered duplicate bindings %d and %d", + sway_log(SWAY_DEBUG, "encountered duplicate bindings %d and %d", (*current_binding)->order, binding->order); } else if (!*current_binding || strcmp((*current_binding)->input, "*") == 0) { @@ -219,7 +219,7 @@ void sway_keyboard_disarm_key_repeat(struct sway_keyboard *keyboard) { } keyboard->repeat_binding = NULL; if (wl_event_source_timer_update(keyboard->key_repeat_source, 0) < 0) { - wlr_log(WLR_DEBUG, "failed to disarm key repeat timer"); + sway_log(SWAY_DEBUG, "failed to disarm key repeat timer"); } } @@ -313,7 +313,7 @@ static void handle_keyboard_key(struct wl_listener *listener, void *data) { keyboard->repeat_binding = binding; if (wl_event_source_timer_update(keyboard->key_repeat_source, wlr_device->keyboard->repeat_info.delay) < 0) { - wlr_log(WLR_DEBUG, "failed to set key repeat timer"); + sway_log(SWAY_DEBUG, "failed to set key repeat timer"); } } else if (keyboard->repeat_binding) { sway_keyboard_disarm_key_repeat(keyboard); @@ -356,7 +356,7 @@ static int handle_keyboard_repeat(void *data) { // We queue the next event first, as the command might cancel it if (wl_event_source_timer_update(keyboard->key_repeat_source, 1000 / wlr_device->repeat_info.rate) < 0) { - wlr_log(WLR_DEBUG, "failed to update key repeat timer"); + sway_log(SWAY_DEBUG, "failed to update key repeat timer"); } } @@ -460,7 +460,7 @@ void sway_keyboard_configure(struct sway_keyboard *keyboard) { xkb_keymap_new_from_names(context, &rules, XKB_KEYMAP_COMPILE_NO_FLAGS); if (!keymap) { - wlr_log(WLR_DEBUG, "cannot configure keyboard: keymap does not exist"); + sway_log(SWAY_DEBUG, "cannot configure keyboard: keymap does not exist"); xkb_context_unref(context); return; } diff --git a/sway/input/seat.c b/sway/input/seat.c index a66a8198..82e0e754 100644 --- a/sway/input/seat.c +++ b/sway/input/seat.c @@ -62,7 +62,7 @@ static void seat_node_destroy(struct sway_seat_node *seat_node) { static void seat_send_activate(struct sway_node *node, struct sway_seat *seat) { if (node_is_view(node)) { if (!seat_is_input_allowed(seat, node->sway_container->view->surface)) { - wlr_log(WLR_DEBUG, "Refusing to set focus, input is inhibited"); + sway_log(SWAY_DEBUG, "Refusing to set focus, input is inhibited"); return; } view_set_activated(node->sway_container->view, true); @@ -208,7 +208,7 @@ static struct sway_seat_node *seat_node_from_node( seat_node = calloc(1, sizeof(struct sway_seat_node)); if (seat_node == NULL) { - wlr_log(WLR_ERROR, "could not allocate seat node"); + sway_log(SWAY_ERROR, "could not allocate seat node"); return NULL; } @@ -289,7 +289,7 @@ static void handle_new_drag_icon(struct wl_listener *listener, void *data) { struct sway_drag_icon *icon = calloc(1, sizeof(struct sway_drag_icon)); if (icon == NULL) { - wlr_log(WLR_ERROR, "Allocation failed"); + sway_log(SWAY_ERROR, "Allocation failed"); return; } icon->seat = seat; @@ -407,7 +407,7 @@ static void seat_update_capabilities(struct sway_seat *seat) { static void seat_reset_input_config(struct sway_seat *seat, struct sway_seat_device *sway_device) { - wlr_log(WLR_DEBUG, "Resetting output mapping for input device %s", + sway_log(SWAY_DEBUG, "Resetting output mapping for input device %s", sway_device->input_device->identifier); wlr_cursor_map_input_to_output(seat->cursor->cursor, sway_device->input_device->wlr_device, NULL); @@ -420,7 +420,7 @@ static void seat_apply_input_config(struct sway_seat *seat, struct input_config *ic = input_device_get_config( sway_device->input_device); if (ic != NULL) { - wlr_log(WLR_DEBUG, "Applying input config to %s", + sway_log(SWAY_DEBUG, "Applying input config to %s", sway_device->input_device->identifier); mapped_to_output = ic->mapped_to_output; @@ -430,19 +430,19 @@ static void seat_apply_input_config(struct sway_seat *seat, mapped_to_output = sway_device->input_device->wlr_device->output_name; } if (mapped_to_output != NULL) { - wlr_log(WLR_DEBUG, "Mapping input device %s to output %s", + sway_log(SWAY_DEBUG, "Mapping input device %s to output %s", sway_device->input_device->identifier, mapped_to_output); if (strcmp("*", mapped_to_output) == 0) { wlr_cursor_map_input_to_output(seat->cursor->cursor, sway_device->input_device->wlr_device, NULL); - wlr_log(WLR_DEBUG, "Reset output mapping"); + sway_log(SWAY_DEBUG, "Reset output mapping"); return; } struct sway_output *output = output_by_name_or_id(mapped_to_output); if (output) { wlr_cursor_map_input_to_output(seat->cursor->cursor, sway_device->input_device->wlr_device, output->wlr_output); - wlr_log(WLR_DEBUG, "Mapped to output %s", output->wlr_output->name); + sway_log(SWAY_DEBUG, "Mapped to output %s", output->wlr_output->name); } } } @@ -522,10 +522,10 @@ void seat_configure_device(struct sway_seat *seat, seat_configure_tablet_tool(seat, seat_device); break; case WLR_INPUT_DEVICE_TABLET_PAD: - wlr_log(WLR_DEBUG, "TODO: configure tablet pad"); + sway_log(SWAY_DEBUG, "TODO: configure tablet pad"); break; case WLR_INPUT_DEVICE_SWITCH: - wlr_log(WLR_DEBUG, "TODO: configure switch device"); + sway_log(SWAY_DEBUG, "TODO: configure switch device"); break; } } @@ -552,10 +552,10 @@ void seat_reset_device(struct sway_seat *seat, seat_reset_input_config(seat, seat_device); break; case WLR_INPUT_DEVICE_TABLET_PAD: - wlr_log(WLR_DEBUG, "TODO: reset tablet pad"); + sway_log(SWAY_DEBUG, "TODO: reset tablet pad"); break; case WLR_INPUT_DEVICE_SWITCH: - wlr_log(WLR_DEBUG, "TODO: reset switch device"); + sway_log(SWAY_DEBUG, "TODO: reset switch device"); break; } } @@ -570,11 +570,11 @@ void seat_add_device(struct sway_seat *seat, struct sway_seat_device *seat_device = calloc(1, sizeof(struct sway_seat_device)); if (!seat_device) { - wlr_log(WLR_DEBUG, "could not allocate seat device"); + sway_log(SWAY_DEBUG, "could not allocate seat device"); return; } - wlr_log(WLR_DEBUG, "adding device %s to seat %s", + sway_log(SWAY_DEBUG, "adding device %s to seat %s", input_device->identifier, seat->wlr_seat->name); seat_device->sway_seat = seat; @@ -594,7 +594,7 @@ void seat_remove_device(struct sway_seat *seat, return; } - wlr_log(WLR_DEBUG, "removing device %s from seat %s", + sway_log(SWAY_DEBUG, "removing device %s from seat %s", input_device->identifier, seat->wlr_seat->name); seat_device_destroy(seat_device); @@ -790,7 +790,7 @@ void seat_set_focus(struct sway_seat *seat, struct sway_node *node) { wl_event_source_timer_update(view->urgent_timer, config->urgent_timeout); } else { - wlr_log(WLR_ERROR, "Unable to create urgency timer (%s)", + sway_log(SWAY_ERROR, "Unable to create urgency timer (%s)", strerror(errno)); handle_urgent_timeout(view); } -- cgit v1.2.3-54-g00ecf