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
|
|
@ -97,7 +97,7 @@ void output_enable(struct sway_output *output, struct output_config *oc) {
|
|||
if (!output->workspaces->length) {
|
||||
// Create workspace
|
||||
char *ws_name = workspace_next_name(wlr_output->name);
|
||||
wlr_log(WLR_DEBUG, "Creating default workspace %s", ws_name);
|
||||
sway_log(SWAY_DEBUG, "Creating default workspace %s", ws_name);
|
||||
ws = workspace_create(output, ws_name);
|
||||
// Set each seat's focus if not already set
|
||||
struct sway_seat *seat = NULL;
|
||||
|
|
@ -212,7 +212,7 @@ void output_disable(struct sway_output *output) {
|
|||
if (!sway_assert(output->enabled, "Expected an enabled output")) {
|
||||
return;
|
||||
}
|
||||
wlr_log(WLR_DEBUG, "Disabling output '%s'", output->wlr_output->name);
|
||||
sway_log(SWAY_DEBUG, "Disabling output '%s'", output->wlr_output->name);
|
||||
wl_signal_emit(&output->events.destroy, output);
|
||||
|
||||
output_evacuate(output);
|
||||
|
|
@ -237,7 +237,7 @@ void output_begin_destroy(struct sway_output *output) {
|
|||
if (!sway_assert(!output->enabled, "Expected a disabled output")) {
|
||||
return;
|
||||
}
|
||||
wlr_log(WLR_DEBUG, "Destroying output '%s'", output->wlr_output->name);
|
||||
sway_log(SWAY_DEBUG, "Destroying output '%s'", output->wlr_output->name);
|
||||
|
||||
output->node.destroying = true;
|
||||
node_set_dirty(&output->node);
|
||||
|
|
@ -258,11 +258,11 @@ struct output_config *output_find_config(struct sway_output *output) {
|
|||
|
||||
if (strcasecmp(name, cur->name) == 0 ||
|
||||
strcasecmp(identifier, cur->name) == 0) {
|
||||
wlr_log(WLR_DEBUG, "Matched output config for %s", name);
|
||||
sway_log(SWAY_DEBUG, "Matched output config for %s", name);
|
||||
oc = cur;
|
||||
}
|
||||
if (strcasecmp("*", cur->name) == 0) {
|
||||
wlr_log(WLR_DEBUG, "Matched wildcard output config for %s", name);
|
||||
sway_log(SWAY_DEBUG, "Matched wildcard output config for %s", name);
|
||||
all = cur;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue