From 63b4bf500020cf35cebfdce2d73f8e359ff495c2 Mon Sep 17 00:00:00 2001
From: emersion <contact@emersion.fr>
Date: Mon, 9 Jul 2018 22:54:30 +0100
Subject: Update for swaywm/wlroots#1126

---
 sway/desktop/idle_inhibit_v1.c |  4 ++--
 sway/desktop/layer_shell.c     |  6 +++---
 sway/desktop/output.c          |  2 +-
 sway/desktop/transaction.c     | 14 +++++++-------
 sway/desktop/xdg_shell.c       |  4 ++--
 sway/desktop/xdg_shell_v6.c    |  4 ++--
 sway/desktop/xwayland.c        | 10 +++++-----
 7 files changed, 22 insertions(+), 22 deletions(-)

(limited to 'sway/desktop')

diff --git a/sway/desktop/idle_inhibit_v1.c b/sway/desktop/idle_inhibit_v1.c
index c02ca26e..108a8417 100644
--- a/sway/desktop/idle_inhibit_v1.c
+++ b/sway/desktop/idle_inhibit_v1.c
@@ -9,7 +9,7 @@
 static void handle_destroy(struct wl_listener *listener, void *data) {
 	struct sway_idle_inhibitor_v1 *inhibitor =
 		wl_container_of(listener, inhibitor, destroy);
-	wlr_log(L_DEBUG, "Sway idle inhibitor destroyed");
+	wlr_log(WLR_DEBUG, "Sway idle inhibitor destroyed");
 	wl_list_remove(&inhibitor->link);
 	wl_list_remove(&inhibitor->destroy.link);
 	idle_inhibit_v1_check_active(inhibitor->manager);
@@ -20,7 +20,7 @@ void handle_idle_inhibitor_v1(struct wl_listener *listener, void *data) {
 	struct wlr_idle_inhibitor_v1 *wlr_inhibitor = data;
 	struct sway_idle_inhibit_manager_v1 *manager =
 		wl_container_of(listener, manager, new_idle_inhibitor_v1);
-	wlr_log(L_DEBUG, "New sway idle inhibitor");
+	wlr_log(WLR_DEBUG, "New sway idle inhibitor");
 
 	struct sway_idle_inhibitor_v1 *inhibitor =
 		calloc(1, sizeof(struct sway_idle_inhibitor_v1));
diff --git a/sway/desktop/layer_shell.c b/sway/desktop/layer_shell.c
index de1fe349..16910c7e 100644
--- a/sway/desktop/layer_shell.c
+++ b/sway/desktop/layer_shell.c
@@ -174,7 +174,7 @@ void arrange_layers(struct sway_output *output) {
 
 	if (memcmp(&usable_area, &output->usable_area,
 				sizeof(struct wlr_box)) != 0) {
-		wlr_log(L_DEBUG, "Usable area changed, rearranging output");
+		wlr_log(WLR_DEBUG, "Usable area changed, rearranging output");
 		memcpy(&output->usable_area, &usable_area, sizeof(struct wlr_box));
 		arrange_and_commit(output->swayc);
 	}
@@ -269,7 +269,7 @@ static void unmap(struct sway_layer_surface *sway_layer) {
 static void handle_destroy(struct wl_listener *listener, void *data) {
 	struct sway_layer_surface *sway_layer =
 		wl_container_of(listener, sway_layer, destroy);
-	wlr_log(L_DEBUG, "Layer surface destroyed (%s)",
+	wlr_log(WLR_DEBUG, "Layer surface destroyed (%s)",
 		sway_layer->layer_surface->namespace);
 	if (sway_layer->layer_surface->mapped) {
 		unmap(sway_layer);
@@ -316,7 +316,7 @@ void handle_layer_shell_surface(struct wl_listener *listener, void *data) {
 	struct wlr_layer_surface *layer_surface = data;
 	struct sway_server *server =
 		wl_container_of(listener, server, layer_shell_surface);
-	wlr_log(L_DEBUG, "new layer surface: namespace %s layer %d anchor %d "
+	wlr_log(WLR_DEBUG, "new layer surface: namespace %s layer %d anchor %d "
 			"size %dx%d margin %d,%d,%d,%d",
 		layer_surface->namespace, layer_surface->layer, layer_surface->layer,
 		layer_surface->client_pending.desired_width,
diff --git a/sway/desktop/output.c b/sway/desktop/output.c
index 8b50bc44..73108450 100644
--- a/sway/desktop/output.c
+++ b/sway/desktop/output.c
@@ -525,7 +525,7 @@ struct sway_output *output_from_wlr_output(struct wlr_output *wlr_output) {
 void handle_new_output(struct wl_listener *listener, void *data) {
 	struct sway_server *server = wl_container_of(listener, server, new_output);
 	struct wlr_output *wlr_output = data;
-	wlr_log(L_DEBUG, "New output %p: %s", wlr_output, wlr_output->name);
+	wlr_log(WLR_DEBUG, "New output %p: %s", wlr_output, wlr_output->name);
 
 	struct sway_output *output = calloc(1, sizeof(struct sway_output));
 	if (!output) {
diff --git a/sway/desktop/transaction.c b/sway/desktop/transaction.c
index 179af617..2b3f87c3 100644
--- a/sway/desktop/transaction.c
+++ b/sway/desktop/transaction.c
@@ -175,7 +175,7 @@ void transaction_add_container(struct sway_transaction *transaction,
  * Apply a transaction to the "current" state of the tree.
  */
 static void transaction_apply(struct sway_transaction *transaction) {
-	wlr_log(L_DEBUG, "Applying transaction %p", transaction);
+	wlr_log(WLR_DEBUG, "Applying transaction %p", transaction);
 	if (server.debug_txn_timings) {
 		struct timespec now;
 		clock_gettime(CLOCK_MONOTONIC, &now);
@@ -186,7 +186,7 @@ static void transaction_apply(struct sway_transaction *transaction) {
 		float ms_waiting = (now.tv_sec - commit->tv_sec) * 1000 +
 			(now.tv_nsec - commit->tv_nsec) / 1000000.0;
 		float ms_total = ms_arranging + ms_waiting;
-		wlr_log(L_DEBUG, "Transaction %p: %.1fms arranging, %.1fms waiting, "
+		wlr_log(WLR_DEBUG, "Transaction %p: %.1fms arranging, %.1fms waiting, "
 			"%.1fms total (%.1f frames if 60Hz)", transaction,
 			ms_arranging, ms_waiting, ms_total, ms_total / (1000.0f / 60));
 	}
@@ -251,7 +251,7 @@ static void transaction_progress_queue() {
 
 static int handle_timeout(void *data) {
 	struct sway_transaction *transaction = data;
-	wlr_log(L_DEBUG, "Transaction %p timed out (%li waiting)",
+	wlr_log(WLR_DEBUG, "Transaction %p timed out (%li waiting)",
 			transaction, transaction->num_waiting);
 	transaction->num_waiting = 0;
 	transaction_progress_queue();
@@ -286,7 +286,7 @@ static bool should_configure(struct sway_container *con,
 }
 
 void transaction_commit(struct sway_transaction *transaction) {
-	wlr_log(L_DEBUG, "Transaction %p committing with %i instructions",
+	wlr_log(WLR_DEBUG, "Transaction %p committing with %i instructions",
 			transaction, transaction->instructions->length);
 	transaction->num_waiting = 0;
 	for (int i = 0; i < transaction->instructions->length; ++i) {
@@ -319,7 +319,7 @@ void transaction_commit(struct sway_transaction *transaction) {
 	} else {
 		// There are no other transactions in progress, and this one has nothing
 		// to wait for, so we can skip the queue.
-		wlr_log(L_DEBUG, "Transaction %p has nothing to wait for", transaction);
+		wlr_log(WLR_DEBUG, "Transaction %p has nothing to wait for", transaction);
 		transaction_apply(transaction);
 		transaction_destroy(transaction);
 		idle_inhibit_v1_check_active(server.idle_inhibit_manager_v1);
@@ -350,7 +350,7 @@ static void set_instruction_ready(
 		struct timespec *start = &transaction->commit_time;
 		float ms = (now.tv_sec - start->tv_sec) * 1000 +
 			(now.tv_nsec - start->tv_nsec) / 1000000.0;
-		wlr_log(L_DEBUG, "Transaction %p: %li/%li ready in %.1fms (%s)",
+		wlr_log(WLR_DEBUG, "Transaction %p: %li/%li ready in %.1fms (%s)",
 				transaction,
 				transaction->num_configures - transaction->num_waiting + 1,
 				transaction->num_configures, ms,
@@ -362,7 +362,7 @@ static void set_instruction_ready(
 	// If the transaction has timed out then its num_waiting will be 0 already.
 	if (transaction->num_waiting > 0 && --transaction->num_waiting == 0) {
 #if !TRANSACTION_DEBUG
-		wlr_log(L_DEBUG, "Transaction %p is ready", transaction);
+		wlr_log(WLR_DEBUG, "Transaction %p is ready", transaction);
 		wl_event_source_timer_update(transaction->timer, 0);
 		transaction_progress_queue();
 #endif
diff --git a/sway/desktop/xdg_shell.c b/sway/desktop/xdg_shell.c
index ac35a8d1..be14adbe 100644
--- a/sway/desktop/xdg_shell.c
+++ b/sway/desktop/xdg_shell.c
@@ -304,11 +304,11 @@ void handle_xdg_shell_surface(struct wl_listener *listener, void *data) {
 	struct wlr_xdg_surface *xdg_surface = data;
 
 	if (xdg_surface->role == WLR_XDG_SURFACE_ROLE_POPUP) {
-		wlr_log(L_DEBUG, "New xdg_shell popup");
+		wlr_log(WLR_DEBUG, "New xdg_shell popup");
 		return;
 	}
 
-	wlr_log(L_DEBUG, "New xdg_shell toplevel title='%s' app_id='%s'",
+	wlr_log(WLR_DEBUG, "New xdg_shell toplevel title='%s' app_id='%s'",
 		xdg_surface->toplevel->title, xdg_surface->toplevel->app_id);
 	wlr_xdg_surface_ping(xdg_surface);
 
diff --git a/sway/desktop/xdg_shell_v6.c b/sway/desktop/xdg_shell_v6.c
index 56bbb244..f5cf085a 100644
--- a/sway/desktop/xdg_shell_v6.c
+++ b/sway/desktop/xdg_shell_v6.c
@@ -295,11 +295,11 @@ void handle_xdg_shell_v6_surface(struct wl_listener *listener, void *data) {
 	struct wlr_xdg_surface_v6 *xdg_surface = data;
 
 	if (xdg_surface->role == WLR_XDG_SURFACE_V6_ROLE_POPUP) {
-		wlr_log(L_DEBUG, "New xdg_shell_v6 popup");
+		wlr_log(WLR_DEBUG, "New xdg_shell_v6 popup");
 		return;
 	}
 
-	wlr_log(L_DEBUG, "New xdg_shell_v6 toplevel title='%s' app_id='%s'",
+	wlr_log(WLR_DEBUG, "New xdg_shell_v6 toplevel title='%s' app_id='%s'",
 		xdg_surface->toplevel->title, xdg_surface->toplevel->app_id);
 	wlr_xdg_surface_v6_ping(xdg_surface);
 
diff --git a/sway/desktop/xwayland.c b/sway/desktop/xwayland.c
index b2874cfe..4e5cea7d 100644
--- a/sway/desktop/xwayland.c
+++ b/sway/desktop/xwayland.c
@@ -119,7 +119,7 @@ static struct sway_xwayland_unmanaged *create_unmanaged(
 	struct sway_xwayland_unmanaged *surface =
 		calloc(1, sizeof(struct sway_xwayland_unmanaged));
 	if (surface == NULL) {
-		wlr_log(L_ERROR, "Allocation failed");
+		wlr_log(WLR_ERROR, "Allocation failed");
 		return NULL;
 	}
 
@@ -432,12 +432,12 @@ void handle_xwayland_surface(struct wl_listener *listener, void *data) {
 
 	if (wlr_xwayland_surface_is_unmanaged(xsurface) ||
 			xsurface->override_redirect) {
-		wlr_log(L_DEBUG, "New xwayland unmanaged surface");
+		wlr_log(WLR_DEBUG, "New xwayland unmanaged surface");
 		create_unmanaged(xsurface);
 		return;
 	}
 
-	wlr_log(L_DEBUG, "New xwayland surface title='%s' class='%s'",
+	wlr_log(WLR_DEBUG, "New xwayland surface title='%s' class='%s'",
 		xsurface->title, xsurface->class);
 
 	struct sway_xwayland_view *xwayland_view =
@@ -490,7 +490,7 @@ void handle_xwayland_ready(struct wl_listener *listener, void *data) {
 	xcb_connection_t *xcb_conn = xcb_connect(NULL, NULL);
 	int err = xcb_connection_has_error(xcb_conn);
 	if (err) {
-		wlr_log(L_ERROR, "XCB connect failed: %d", err);
+		wlr_log(WLR_ERROR, "XCB connect failed: %d", err);
 		return;
 	}
 
@@ -509,7 +509,7 @@ void handle_xwayland_ready(struct wl_listener *listener, void *data) {
 		free(reply);
 
 		if (error != NULL) {
-			wlr_log(L_ERROR, "could not resolve atom %s, X11 error code %d",
+			wlr_log(WLR_ERROR, "could not resolve atom %s, X11 error code %d",
 				atom_map[i], error->error_code);
 			free(error);
 			break;
-- 
cgit v1.2.3