mirror of
https://github.com/swaywm/sway.git
synced 2026-04-22 06:46:27 -04:00
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.
This commit is contained in:
parent
5c834d36e1
commit
1211a81aad
108 changed files with 613 additions and 504 deletions
|
|
@ -35,7 +35,7 @@ static void apply_horiz_layout(list_t *children, struct wlr_box *parent) {
|
|||
double scale = parent->width / total_width;
|
||||
|
||||
// Resize windows
|
||||
wlr_log(WLR_DEBUG, "Arranging %p horizontally", parent);
|
||||
sway_log(SWAY_DEBUG, "Arranging %p horizontally", parent);
|
||||
double child_x = parent->x;
|
||||
for (int i = 0; i < children->length; ++i) {
|
||||
struct sway_container *child = children->items[i];
|
||||
|
|
@ -75,7 +75,7 @@ static void apply_vert_layout(list_t *children, struct wlr_box *parent) {
|
|||
double scale = parent->height / total_height;
|
||||
|
||||
// Resize
|
||||
wlr_log(WLR_DEBUG, "Arranging %p vertically", parent);
|
||||
sway_log(SWAY_DEBUG, "Arranging %p vertically", parent);
|
||||
double child_y = parent->y;
|
||||
for (int i = 0; i < children->length; ++i) {
|
||||
struct sway_container *child = children->items[i];
|
||||
|
|
@ -186,7 +186,7 @@ void arrange_workspace(struct sway_workspace *workspace) {
|
|||
}
|
||||
struct sway_output *output = workspace->output;
|
||||
struct wlr_box *area = &output->usable_area;
|
||||
wlr_log(WLR_DEBUG, "Usable area for ws: %dx%d@%d,%d",
|
||||
sway_log(SWAY_DEBUG, "Usable area for ws: %dx%d@%d,%d",
|
||||
area->width, area->height, area->x, area->y);
|
||||
workspace_remove_gaps(workspace);
|
||||
|
||||
|
|
@ -217,7 +217,7 @@ void arrange_workspace(struct sway_workspace *workspace) {
|
|||
|
||||
workspace_add_gaps(workspace);
|
||||
node_set_dirty(&workspace->node);
|
||||
wlr_log(WLR_DEBUG, "Arranging workspace '%s' at %f, %f", workspace->name,
|
||||
sway_log(SWAY_DEBUG, "Arranging workspace '%s' at %f, %f", workspace->name,
|
||||
workspace->x, workspace->y);
|
||||
if (workspace->fullscreen) {
|
||||
struct sway_container *fs = workspace->fullscreen;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue