diff options
author | M Stoeckl <[email protected]> | 2019-01-20 13:51:12 -0500 |
---|---|---|
committer | emersion <[email protected]> | 2019-01-21 12:59:42 +0100 |
commit | 1211a81aad18bbc4d9e8fb9973238ad8e7e1f688 (patch) | |
tree | 5c3f60e0219cb8b4a1b7cafb760a871661866e32 /sway/commands/move.c | |
parent | 5c834d36e14aaeca4ac1d22b869254d5722af4af (diff) |
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.
Diffstat (limited to 'sway/commands/move.c')
-rw-r--r-- | sway/commands/move.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/sway/commands/move.c b/sway/commands/move.c index d4b55922..b22bb056 100644 --- a/sway/commands/move.c +++ b/sway/commands/move.c @@ -6,7 +6,6 @@ #include <wlr/types/wlr_cursor.h> #include <wlr/types/wlr_output.h> #include <wlr/types/wlr_output_layout.h> -#include <wlr/util/log.h> #include "sway/commands.h" #include "sway/input/cursor.h" #include "sway/input/seat.h" @@ -106,13 +105,13 @@ static void container_move_to_container_from_direction( if (destination->view) { if (destination->parent == container->parent && destination->workspace == container->workspace) { - wlr_log(WLR_DEBUG, "Swapping siblings"); + sway_log(SWAY_DEBUG, "Swapping siblings"); list_t *siblings = container_get_siblings(container); int container_index = list_find(siblings, container); int destination_index = list_find(siblings, destination); list_swap(siblings, container_index, destination_index); } else { - wlr_log(WLR_DEBUG, "Promoting to sibling of cousin"); + sway_log(SWAY_DEBUG, "Promoting to sibling of cousin"); int offset = move_dir == WLR_DIRECTION_LEFT || move_dir == WLR_DIRECTION_UP; int index = container_sibling_index(destination) + offset; @@ -128,7 +127,7 @@ static void container_move_to_container_from_direction( } if (is_parallel(destination->layout, move_dir)) { - wlr_log(WLR_DEBUG, "Reparenting container (parallel)"); + sway_log(SWAY_DEBUG, "Reparenting container (parallel)"); int index = move_dir == WLR_DIRECTION_RIGHT || move_dir == WLR_DIRECTION_DOWN ? 0 : destination->children->length; @@ -137,7 +136,7 @@ static void container_move_to_container_from_direction( return; } - wlr_log(WLR_DEBUG, "Reparenting container (perpendicular)"); + sway_log(SWAY_DEBUG, "Reparenting container (perpendicular)"); struct sway_node *focus_inactive = seat_get_active_tiling_child( config->handler_context.seat, &destination->node); if (!focus_inactive || focus_inactive == &destination->node) { @@ -157,7 +156,7 @@ static void container_move_to_workspace_from_direction( container->width = container->height = 0; if (is_parallel(workspace->layout, move_dir)) { - wlr_log(WLR_DEBUG, "Reparenting container (parallel)"); + sway_log(SWAY_DEBUG, "Reparenting container (parallel)"); int index = move_dir == WLR_DIRECTION_RIGHT || move_dir == WLR_DIRECTION_DOWN ? 0 : workspace->tiling->length; @@ -165,7 +164,7 @@ static void container_move_to_workspace_from_direction( return; } - wlr_log(WLR_DEBUG, "Reparenting container (perpendicular)"); + sway_log(SWAY_DEBUG, "Reparenting container (perpendicular)"); struct sway_container *focus_inactive = seat_get_focus_inactive_tiling( config->handler_context.seat, workspace); if (!focus_inactive) { @@ -362,7 +361,7 @@ static bool container_move_in_direction(struct sway_container *container, container_move_to_workspace_from_direction(container, ws, move_dir); return true; } - wlr_log(WLR_DEBUG, "Hit edge of output, nowhere else to go"); + sway_log(SWAY_DEBUG, "Hit edge of output, nowhere else to go"); return false; } |