mirror of
https://github.com/swaywm/sway.git
synced 2025-11-24 06:59:51 -05:00
sway: change all sway_log to wlr_log
This commit is contained in:
parent
fdc92e7454
commit
67985e9031
36 changed files with 167 additions and 190 deletions
|
|
@ -85,35 +85,35 @@ static void handle_touch_down(struct wl_listener *listener, void *data) {
|
|||
struct sway_cursor *cursor =
|
||||
wl_container_of(listener, cursor, touch_down);
|
||||
struct wlr_event_touch_down *event = data;
|
||||
sway_log(L_DEBUG, "TODO: handle touch down event: %p", event);
|
||||
wlr_log(L_DEBUG, "TODO: handle touch down event: %p", event);
|
||||
}
|
||||
|
||||
static void handle_touch_up(struct wl_listener *listener, void *data) {
|
||||
struct sway_cursor *cursor =
|
||||
wl_container_of(listener, cursor, touch_up);
|
||||
struct wlr_event_touch_up *event = data;
|
||||
sway_log(L_DEBUG, "TODO: handle touch up event: %p", event);
|
||||
wlr_log(L_DEBUG, "TODO: handle touch up event: %p", event);
|
||||
}
|
||||
|
||||
static void handle_touch_motion(struct wl_listener *listener, void *data) {
|
||||
struct sway_cursor *cursor =
|
||||
wl_container_of(listener, cursor, touch_motion);
|
||||
struct wlr_event_touch_motion *event = data;
|
||||
sway_log(L_DEBUG, "TODO: handle touch motion event: %p", event);
|
||||
wlr_log(L_DEBUG, "TODO: handle touch motion event: %p", event);
|
||||
}
|
||||
|
||||
static void handle_tool_axis(struct wl_listener *listener, void *data) {
|
||||
struct sway_cursor *cursor =
|
||||
wl_container_of(listener, cursor, tool_axis);
|
||||
struct wlr_event_tablet_tool_axis *event = data;
|
||||
sway_log(L_DEBUG, "TODO: handle tool axis event: %p", event);
|
||||
wlr_log(L_DEBUG, "TODO: handle tool axis event: %p", event);
|
||||
}
|
||||
|
||||
static void handle_tool_tip(struct wl_listener *listener, void *data) {
|
||||
struct sway_cursor *cursor =
|
||||
wl_container_of(listener, cursor, tool_tip);
|
||||
struct wlr_event_tablet_tool_tip *event = data;
|
||||
sway_log(L_DEBUG, "TODO: handle tool tip event: %p", event);
|
||||
wlr_log(L_DEBUG, "TODO: handle tool tip event: %p", event);
|
||||
}
|
||||
|
||||
static void handle_request_set_cursor(struct wl_listener *listener,
|
||||
|
|
@ -121,7 +121,7 @@ static void handle_request_set_cursor(struct wl_listener *listener,
|
|||
struct sway_cursor *cursor =
|
||||
wl_container_of(listener, cursor, request_set_cursor);
|
||||
struct wlr_seat_pointer_request_set_cursor_event *event = data;
|
||||
sway_log(L_DEBUG, "TODO: handle request set cursor event: %p", event);
|
||||
wlr_log(L_DEBUG, "TODO: handle request set cursor event: %p", event);
|
||||
}
|
||||
|
||||
struct sway_cursor *sway_cursor_create(struct sway_seat *seat) {
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ static char *get_device_identifier(struct wlr_input_device *device) {
|
|||
int len = snprintf(NULL, 0, fmt, vendor, product, name) + 1;
|
||||
char *identifier = malloc(len);
|
||||
if (!identifier) {
|
||||
sway_log(L_ERROR, "Unable to allocate unique input device name");
|
||||
wlr_log(L_ERROR, "Unable to allocate unique input device name");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
@ -93,60 +93,60 @@ static void sway_input_manager_libinput_config_pointer(struct sway_input_device
|
|||
}
|
||||
|
||||
libinput_device = wlr_libinput_get_device_handle(wlr_device);
|
||||
sway_log(L_DEBUG, "sway_input_manager_libinput_config_pointer(%s)", ic->identifier);
|
||||
wlr_log(L_DEBUG, "sway_input_manager_libinput_config_pointer(%s)", ic->identifier);
|
||||
|
||||
if (ic->accel_profile != INT_MIN) {
|
||||
sway_log(L_DEBUG, "libinput_config_pointer(%s) accel_set_profile(%d)",
|
||||
wlr_log(L_DEBUG, "libinput_config_pointer(%s) accel_set_profile(%d)",
|
||||
ic->identifier, ic->accel_profile);
|
||||
libinput_device_config_accel_set_profile(libinput_device, ic->accel_profile);
|
||||
}
|
||||
if (ic->click_method != INT_MIN) {
|
||||
sway_log(L_DEBUG, "libinput_config_pointer(%s) click_set_method(%d)",
|
||||
wlr_log(L_DEBUG, "libinput_config_pointer(%s) click_set_method(%d)",
|
||||
ic->identifier, ic->click_method);
|
||||
libinput_device_config_click_set_method(libinput_device, ic->click_method);
|
||||
}
|
||||
if (ic->drag_lock != INT_MIN) {
|
||||
sway_log(L_DEBUG, "libinput_config_pointer(%s) tap_set_drag_lock_enabled(%d)",
|
||||
wlr_log(L_DEBUG, "libinput_config_pointer(%s) tap_set_drag_lock_enabled(%d)",
|
||||
ic->identifier, ic->click_method);
|
||||
libinput_device_config_tap_set_drag_lock_enabled(libinput_device, ic->drag_lock);
|
||||
}
|
||||
if (ic->dwt != INT_MIN) {
|
||||
sway_log(L_DEBUG, "libinput_config_pointer(%s) dwt_set_enabled(%d)",
|
||||
wlr_log(L_DEBUG, "libinput_config_pointer(%s) dwt_set_enabled(%d)",
|
||||
ic->identifier, ic->dwt);
|
||||
libinput_device_config_dwt_set_enabled(libinput_device, ic->dwt);
|
||||
}
|
||||
if (ic->left_handed != INT_MIN) {
|
||||
sway_log(L_DEBUG, "libinput_config_pointer(%s) left_handed_set_enabled(%d)",
|
||||
wlr_log(L_DEBUG, "libinput_config_pointer(%s) left_handed_set_enabled(%d)",
|
||||
ic->identifier, ic->left_handed);
|
||||
libinput_device_config_left_handed_set(libinput_device, ic->left_handed);
|
||||
}
|
||||
if (ic->middle_emulation != INT_MIN) {
|
||||
sway_log(L_DEBUG, "libinput_config_pointer(%s) middle_emulation_set_enabled(%d)",
|
||||
wlr_log(L_DEBUG, "libinput_config_pointer(%s) middle_emulation_set_enabled(%d)",
|
||||
ic->identifier, ic->middle_emulation);
|
||||
libinput_device_config_middle_emulation_set_enabled(libinput_device, ic->middle_emulation);
|
||||
}
|
||||
if (ic->natural_scroll != INT_MIN) {
|
||||
sway_log(L_DEBUG, "libinput_config_pointer(%s) natural_scroll_set_enabled(%d)",
|
||||
wlr_log(L_DEBUG, "libinput_config_pointer(%s) natural_scroll_set_enabled(%d)",
|
||||
ic->identifier, ic->natural_scroll);
|
||||
libinput_device_config_scroll_set_natural_scroll_enabled(libinput_device, ic->natural_scroll);
|
||||
}
|
||||
if (ic->pointer_accel != FLT_MIN) {
|
||||
sway_log(L_DEBUG, "libinput_config_pointer(%s) accel_set_speed(%f)",
|
||||
wlr_log(L_DEBUG, "libinput_config_pointer(%s) accel_set_speed(%f)",
|
||||
ic->identifier, ic->pointer_accel);
|
||||
libinput_device_config_accel_set_speed(libinput_device, ic->pointer_accel);
|
||||
}
|
||||
if (ic->scroll_method != INT_MIN) {
|
||||
sway_log(L_DEBUG, "libinput_config_pointer(%s) scroll_set_method(%d)",
|
||||
wlr_log(L_DEBUG, "libinput_config_pointer(%s) scroll_set_method(%d)",
|
||||
ic->identifier, ic->scroll_method);
|
||||
libinput_device_config_scroll_set_method(libinput_device, ic->scroll_method);
|
||||
}
|
||||
if (ic->send_events != INT_MIN) {
|
||||
sway_log(L_DEBUG, "libinput_config_pointer(%s) send_events_set_mode(%d)",
|
||||
wlr_log(L_DEBUG, "libinput_config_pointer(%s) send_events_set_mode(%d)",
|
||||
ic->identifier, ic->send_events);
|
||||
libinput_device_config_send_events_set_mode(libinput_device, ic->send_events);
|
||||
}
|
||||
if (ic->tap != INT_MIN) {
|
||||
sway_log(L_DEBUG, "libinput_config_pointer(%s) tap_set_enabled(%d)",
|
||||
wlr_log(L_DEBUG, "libinput_config_pointer(%s) tap_set_enabled(%d)",
|
||||
ic->identifier, ic->tap);
|
||||
libinput_device_config_tap_set_enabled(libinput_device, ic->tap);
|
||||
}
|
||||
|
|
@ -167,7 +167,7 @@ static void input_add_notify(struct wl_listener *listener, void *data) {
|
|||
input_device->identifier = get_device_identifier(device);
|
||||
wl_list_insert(&input->devices, &input_device->link);
|
||||
|
||||
sway_log(L_DEBUG, "adding device: '%s'",
|
||||
wlr_log(L_DEBUG, "adding device: '%s'",
|
||||
input_device->identifier);
|
||||
|
||||
// find config
|
||||
|
|
@ -185,7 +185,7 @@ static void input_add_notify(struct wl_listener *listener, void *data) {
|
|||
|
||||
struct sway_seat *seat = NULL;
|
||||
if (!input_has_seat_configuration(input)) {
|
||||
sway_log(L_DEBUG, "no seat configuration, using default seat");
|
||||
wlr_log(L_DEBUG, "no seat configuration, using default seat");
|
||||
seat = input_manager_get_seat(input, default_seat);
|
||||
sway_seat_add_device(seat, input_device);
|
||||
return;
|
||||
|
|
@ -213,7 +213,7 @@ static void input_add_notify(struct wl_listener *listener, void *data) {
|
|||
}
|
||||
|
||||
if (!added) {
|
||||
sway_log(L_DEBUG,
|
||||
wlr_log(L_DEBUG,
|
||||
"device '%s' is not configured on any seats",
|
||||
input_device->identifier);
|
||||
}
|
||||
|
|
@ -231,7 +231,7 @@ static void input_remove_notify(struct wl_listener *listener, void *data) {
|
|||
return;
|
||||
}
|
||||
|
||||
sway_log(L_DEBUG, "removing device: '%s'",
|
||||
wlr_log(L_DEBUG, "removing device: '%s'",
|
||||
input_device->identifier);
|
||||
|
||||
struct sway_seat *seat = NULL;
|
||||
|
|
@ -309,7 +309,7 @@ void sway_input_manager_apply_input_config(struct sway_input_manager *input,
|
|||
|
||||
void sway_input_manager_apply_seat_config(struct sway_input_manager *input,
|
||||
struct seat_config *seat_config) {
|
||||
sway_log(L_DEBUG, "applying new seat config for seat %s",
|
||||
wlr_log(L_DEBUG, "applying new seat config for seat %s",
|
||||
seat_config->name);
|
||||
struct sway_seat *seat = input_manager_get_seat(input, seat_config->name);
|
||||
if (!seat) {
|
||||
|
|
|
|||
|
|
@ -90,11 +90,11 @@ static bool binding_matches_key_state(struct sway_binding *binding,
|
|||
}
|
||||
|
||||
static void binding_execute_command(struct sway_binding *binding) {
|
||||
sway_log(L_DEBUG, "running command for binding: %s",
|
||||
wlr_log(L_DEBUG, "running command for binding: %s",
|
||||
binding->command);
|
||||
struct cmd_results *results = handle_command(binding->command);
|
||||
if (results->status != CMD_SUCCESS) {
|
||||
sway_log(L_DEBUG, "could not run command for binding: %s",
|
||||
wlr_log(L_DEBUG, "could not run command for binding: %s",
|
||||
binding->command);
|
||||
}
|
||||
free_cmd_results(results);
|
||||
|
|
@ -467,7 +467,7 @@ void sway_keyboard_configure(struct sway_keyboard *keyboard) {
|
|||
xkb_keymap_new_from_names(context, &rules, XKB_KEYMAP_COMPILE_NO_FLAGS);
|
||||
|
||||
if (!keymap) {
|
||||
sway_log(L_DEBUG, "cannot configure keyboard: keymap does not exist");
|
||||
wlr_log(L_DEBUG, "cannot configure keyboard: keymap does not exist");
|
||||
xkb_context_unref(context);
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -112,7 +112,7 @@ void sway_seat_configure_device(struct sway_seat *seat,
|
|||
case WLR_INPUT_DEVICE_TOUCH:
|
||||
case WLR_INPUT_DEVICE_TABLET_PAD:
|
||||
case WLR_INPUT_DEVICE_TABLET_TOOL:
|
||||
sway_log(L_DEBUG, "TODO: configure other devices");
|
||||
wlr_log(L_DEBUG, "TODO: configure other devices");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -127,11 +127,11 @@ void sway_seat_add_device(struct sway_seat *seat,
|
|||
struct sway_seat_device *seat_device =
|
||||
calloc(1, sizeof(struct sway_seat_device));
|
||||
if (!seat_device) {
|
||||
sway_log(L_DEBUG, "could not allocate seat device");
|
||||
wlr_log(L_DEBUG, "could not allocate seat device");
|
||||
return;
|
||||
}
|
||||
|
||||
sway_log(L_DEBUG, "adding device %s to seat %s",
|
||||
wlr_log(L_DEBUG, "adding device %s to seat %s",
|
||||
input_device->identifier, seat->wlr_seat->name);
|
||||
|
||||
seat_device->sway_seat = seat;
|
||||
|
|
@ -150,7 +150,7 @@ void sway_seat_remove_device(struct sway_seat *seat,
|
|||
return;
|
||||
}
|
||||
|
||||
sway_log(L_DEBUG, "removing device %s from seat %s",
|
||||
wlr_log(L_DEBUG, "removing device %s from seat %s",
|
||||
input_device->identifier, seat->wlr_seat->name);
|
||||
|
||||
seat_device_destroy(seat_device);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue