aboutsummaryrefslogtreecommitdiffstats
path: root/sway/desktop
diff options
context:
space:
mode:
authorLibravatar emersion <contact@emersion.fr>2018-07-09 22:54:30 +0100
committerLibravatar emersion <contact@emersion.fr>2018-07-09 22:54:30 +0100
commit63b4bf500020cf35cebfdce2d73f8e359ff495c2 (patch)
tree76624b3d4820551261e5c15f773c403c1a41264e /sway/desktop
parentMerge pull request #2223 from RyanDwyer/floating-move (diff)
downloadsway-63b4bf500020cf35cebfdce2d73f8e359ff495c2.tar.gz
sway-63b4bf500020cf35cebfdce2d73f8e359ff495c2.tar.zst
sway-63b4bf500020cf35cebfdce2d73f8e359ff495c2.zip
Update for swaywm/wlroots#1126
Diffstat (limited to 'sway/desktop')
-rw-r--r--sway/desktop/idle_inhibit_v1.c4
-rw-r--r--sway/desktop/layer_shell.c6
-rw-r--r--sway/desktop/output.c2
-rw-r--r--sway/desktop/transaction.c14
-rw-r--r--sway/desktop/xdg_shell.c4
-rw-r--r--sway/desktop/xdg_shell_v6.c4
-rw-r--r--sway/desktop/xwayland.c10
7 files changed, 22 insertions, 22 deletions
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 @@
9static void handle_destroy(struct wl_listener *listener, void *data) { 9static void handle_destroy(struct wl_listener *listener, void *data) {
10 struct sway_idle_inhibitor_v1 *inhibitor = 10 struct sway_idle_inhibitor_v1 *inhibitor =
11 wl_container_of(listener, inhibitor, destroy); 11 wl_container_of(listener, inhibitor, destroy);
12 wlr_log(L_DEBUG, "Sway idle inhibitor destroyed"); 12 wlr_log(WLR_DEBUG, "Sway idle inhibitor destroyed");
13 wl_list_remove(&inhibitor->link); 13 wl_list_remove(&inhibitor->link);
14 wl_list_remove(&inhibitor->destroy.link); 14 wl_list_remove(&inhibitor->destroy.link);
15 idle_inhibit_v1_check_active(inhibitor->manager); 15 idle_inhibit_v1_check_active(inhibitor->manager);
@@ -20,7 +20,7 @@ void handle_idle_inhibitor_v1(struct wl_listener *listener, void *data) {
20 struct wlr_idle_inhibitor_v1 *wlr_inhibitor = data; 20 struct wlr_idle_inhibitor_v1 *wlr_inhibitor = data;
21 struct sway_idle_inhibit_manager_v1 *manager = 21 struct sway_idle_inhibit_manager_v1 *manager =
22 wl_container_of(listener, manager, new_idle_inhibitor_v1); 22 wl_container_of(listener, manager, new_idle_inhibitor_v1);
23 wlr_log(L_DEBUG, "New sway idle inhibitor"); 23 wlr_log(WLR_DEBUG, "New sway idle inhibitor");
24 24
25 struct sway_idle_inhibitor_v1 *inhibitor = 25 struct sway_idle_inhibitor_v1 *inhibitor =
26 calloc(1, sizeof(struct sway_idle_inhibitor_v1)); 26 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) {
174 174
175 if (memcmp(&usable_area, &output->usable_area, 175 if (memcmp(&usable_area, &output->usable_area,
176 sizeof(struct wlr_box)) != 0) { 176 sizeof(struct wlr_box)) != 0) {
177 wlr_log(L_DEBUG, "Usable area changed, rearranging output"); 177 wlr_log(WLR_DEBUG, "Usable area changed, rearranging output");
178 memcpy(&output->usable_area, &usable_area, sizeof(struct wlr_box)); 178 memcpy(&output->usable_area, &usable_area, sizeof(struct wlr_box));
179 arrange_and_commit(output->swayc); 179 arrange_and_commit(output->swayc);
180 } 180 }
@@ -269,7 +269,7 @@ static void unmap(struct sway_layer_surface *sway_layer) {
269static void handle_destroy(struct wl_listener *listener, void *data) { 269static void handle_destroy(struct wl_listener *listener, void *data) {
270 struct sway_layer_surface *sway_layer = 270 struct sway_layer_surface *sway_layer =
271 wl_container_of(listener, sway_layer, destroy); 271 wl_container_of(listener, sway_layer, destroy);
272 wlr_log(L_DEBUG, "Layer surface destroyed (%s)", 272 wlr_log(WLR_DEBUG, "Layer surface destroyed (%s)",
273 sway_layer->layer_surface->namespace); 273 sway_layer->layer_surface->namespace);
274 if (sway_layer->layer_surface->mapped) { 274 if (sway_layer->layer_surface->mapped) {
275 unmap(sway_layer); 275 unmap(sway_layer);
@@ -316,7 +316,7 @@ void handle_layer_shell_surface(struct wl_listener *listener, void *data) {
316 struct wlr_layer_surface *layer_surface = data; 316 struct wlr_layer_surface *layer_surface = data;
317 struct sway_server *server = 317 struct sway_server *server =
318 wl_container_of(listener, server, layer_shell_surface); 318 wl_container_of(listener, server, layer_shell_surface);
319 wlr_log(L_DEBUG, "new layer surface: namespace %s layer %d anchor %d " 319 wlr_log(WLR_DEBUG, "new layer surface: namespace %s layer %d anchor %d "
320 "size %dx%d margin %d,%d,%d,%d", 320 "size %dx%d margin %d,%d,%d,%d",
321 layer_surface->namespace, layer_surface->layer, layer_surface->layer, 321 layer_surface->namespace, layer_surface->layer, layer_surface->layer,
322 layer_surface->client_pending.desired_width, 322 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) {
525void handle_new_output(struct wl_listener *listener, void *data) { 525void handle_new_output(struct wl_listener *listener, void *data) {
526 struct sway_server *server = wl_container_of(listener, server, new_output); 526 struct sway_server *server = wl_container_of(listener, server, new_output);
527 struct wlr_output *wlr_output = data; 527 struct wlr_output *wlr_output = data;
528 wlr_log(L_DEBUG, "New output %p: %s", wlr_output, wlr_output->name); 528 wlr_log(WLR_DEBUG, "New output %p: %s", wlr_output, wlr_output->name);
529 529
530 struct sway_output *output = calloc(1, sizeof(struct sway_output)); 530 struct sway_output *output = calloc(1, sizeof(struct sway_output));
531 if (!output) { 531 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,
175 * Apply a transaction to the "current" state of the tree. 175 * Apply a transaction to the "current" state of the tree.
176 */ 176 */
177static void transaction_apply(struct sway_transaction *transaction) { 177static void transaction_apply(struct sway_transaction *transaction) {
178 wlr_log(L_DEBUG, "Applying transaction %p", transaction); 178 wlr_log(WLR_DEBUG, "Applying transaction %p", transaction);
179 if (server.debug_txn_timings) { 179 if (server.debug_txn_timings) {
180 struct timespec now; 180 struct timespec now;
181 clock_gettime(CLOCK_MONOTONIC, &now); 181 clock_gettime(CLOCK_MONOTONIC, &now);
@@ -186,7 +186,7 @@ static void transaction_apply(struct sway_transaction *transaction) {
186 float ms_waiting = (now.tv_sec - commit->tv_sec) * 1000 + 186 float ms_waiting = (now.tv_sec - commit->tv_sec) * 1000 +
187 (now.tv_nsec - commit->tv_nsec) / 1000000.0; 187 (now.tv_nsec - commit->tv_nsec) / 1000000.0;
188 float ms_total = ms_arranging + ms_waiting; 188 float ms_total = ms_arranging + ms_waiting;
189 wlr_log(L_DEBUG, "Transaction %p: %.1fms arranging, %.1fms waiting, " 189 wlr_log(WLR_DEBUG, "Transaction %p: %.1fms arranging, %.1fms waiting, "
190 "%.1fms total (%.1f frames if 60Hz)", transaction, 190 "%.1fms total (%.1f frames if 60Hz)", transaction,
191 ms_arranging, ms_waiting, ms_total, ms_total / (1000.0f / 60)); 191 ms_arranging, ms_waiting, ms_total, ms_total / (1000.0f / 60));
192 } 192 }
@@ -251,7 +251,7 @@ static void transaction_progress_queue() {
251 251
252static int handle_timeout(void *data) { 252static int handle_timeout(void *data) {
253 struct sway_transaction *transaction = data; 253 struct sway_transaction *transaction = data;
254 wlr_log(L_DEBUG, "Transaction %p timed out (%li waiting)", 254 wlr_log(WLR_DEBUG, "Transaction %p timed out (%li waiting)",
255 transaction, transaction->num_waiting); 255 transaction, transaction->num_waiting);
256 transaction->num_waiting = 0; 256 transaction->num_waiting = 0;
257 transaction_progress_queue(); 257 transaction_progress_queue();
@@ -286,7 +286,7 @@ static bool should_configure(struct sway_container *con,
286} 286}
287 287
288void transaction_commit(struct sway_transaction *transaction) { 288void transaction_commit(struct sway_transaction *transaction) {
289 wlr_log(L_DEBUG, "Transaction %p committing with %i instructions", 289 wlr_log(WLR_DEBUG, "Transaction %p committing with %i instructions",
290 transaction, transaction->instructions->length); 290 transaction, transaction->instructions->length);
291 transaction->num_waiting = 0; 291 transaction->num_waiting = 0;
292 for (int i = 0; i < transaction->instructions->length; ++i) { 292 for (int i = 0; i < transaction->instructions->length; ++i) {
@@ -319,7 +319,7 @@ void transaction_commit(struct sway_transaction *transaction) {
319 } else { 319 } else {
320 // There are no other transactions in progress, and this one has nothing 320 // There are no other transactions in progress, and this one has nothing
321 // to wait for, so we can skip the queue. 321 // to wait for, so we can skip the queue.
322 wlr_log(L_DEBUG, "Transaction %p has nothing to wait for", transaction); 322 wlr_log(WLR_DEBUG, "Transaction %p has nothing to wait for", transaction);
323 transaction_apply(transaction); 323 transaction_apply(transaction);
324 transaction_destroy(transaction); 324 transaction_destroy(transaction);
325 idle_inhibit_v1_check_active(server.idle_inhibit_manager_v1); 325 idle_inhibit_v1_check_active(server.idle_inhibit_manager_v1);
@@ -350,7 +350,7 @@ static void set_instruction_ready(
350 struct timespec *start = &transaction->commit_time; 350 struct timespec *start = &transaction->commit_time;
351 float ms = (now.tv_sec - start->tv_sec) * 1000 + 351 float ms = (now.tv_sec - start->tv_sec) * 1000 +
352 (now.tv_nsec - start->tv_nsec) / 1000000.0; 352 (now.tv_nsec - start->tv_nsec) / 1000000.0;
353 wlr_log(L_DEBUG, "Transaction %p: %li/%li ready in %.1fms (%s)", 353 wlr_log(WLR_DEBUG, "Transaction %p: %li/%li ready in %.1fms (%s)",
354 transaction, 354 transaction,
355 transaction->num_configures - transaction->num_waiting + 1, 355 transaction->num_configures - transaction->num_waiting + 1,
356 transaction->num_configures, ms, 356 transaction->num_configures, ms,
@@ -362,7 +362,7 @@ static void set_instruction_ready(
362 // If the transaction has timed out then its num_waiting will be 0 already. 362 // If the transaction has timed out then its num_waiting will be 0 already.
363 if (transaction->num_waiting > 0 && --transaction->num_waiting == 0) { 363 if (transaction->num_waiting > 0 && --transaction->num_waiting == 0) {
364#if !TRANSACTION_DEBUG 364#if !TRANSACTION_DEBUG
365 wlr_log(L_DEBUG, "Transaction %p is ready", transaction); 365 wlr_log(WLR_DEBUG, "Transaction %p is ready", transaction);
366 wl_event_source_timer_update(transaction->timer, 0); 366 wl_event_source_timer_update(transaction->timer, 0);
367 transaction_progress_queue(); 367 transaction_progress_queue();
368#endif 368#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) {
304 struct wlr_xdg_surface *xdg_surface = data; 304 struct wlr_xdg_surface *xdg_surface = data;
305 305
306 if (xdg_surface->role == WLR_XDG_SURFACE_ROLE_POPUP) { 306 if (xdg_surface->role == WLR_XDG_SURFACE_ROLE_POPUP) {
307 wlr_log(L_DEBUG, "New xdg_shell popup"); 307 wlr_log(WLR_DEBUG, "New xdg_shell popup");
308 return; 308 return;
309 } 309 }
310 310
311 wlr_log(L_DEBUG, "New xdg_shell toplevel title='%s' app_id='%s'", 311 wlr_log(WLR_DEBUG, "New xdg_shell toplevel title='%s' app_id='%s'",
312 xdg_surface->toplevel->title, xdg_surface->toplevel->app_id); 312 xdg_surface->toplevel->title, xdg_surface->toplevel->app_id);
313 wlr_xdg_surface_ping(xdg_surface); 313 wlr_xdg_surface_ping(xdg_surface);
314 314
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) {
295 struct wlr_xdg_surface_v6 *xdg_surface = data; 295 struct wlr_xdg_surface_v6 *xdg_surface = data;
296 296
297 if (xdg_surface->role == WLR_XDG_SURFACE_V6_ROLE_POPUP) { 297 if (xdg_surface->role == WLR_XDG_SURFACE_V6_ROLE_POPUP) {
298 wlr_log(L_DEBUG, "New xdg_shell_v6 popup"); 298 wlr_log(WLR_DEBUG, "New xdg_shell_v6 popup");
299 return; 299 return;
300 } 300 }
301 301
302 wlr_log(L_DEBUG, "New xdg_shell_v6 toplevel title='%s' app_id='%s'", 302 wlr_log(WLR_DEBUG, "New xdg_shell_v6 toplevel title='%s' app_id='%s'",
303 xdg_surface->toplevel->title, xdg_surface->toplevel->app_id); 303 xdg_surface->toplevel->title, xdg_surface->toplevel->app_id);
304 wlr_xdg_surface_v6_ping(xdg_surface); 304 wlr_xdg_surface_v6_ping(xdg_surface);
305 305
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(
119 struct sway_xwayland_unmanaged *surface = 119 struct sway_xwayland_unmanaged *surface =
120 calloc(1, sizeof(struct sway_xwayland_unmanaged)); 120 calloc(1, sizeof(struct sway_xwayland_unmanaged));
121 if (surface == NULL) { 121 if (surface == NULL) {
122 wlr_log(L_ERROR, "Allocation failed"); 122 wlr_log(WLR_ERROR, "Allocation failed");
123 return NULL; 123 return NULL;
124 } 124 }
125 125
@@ -432,12 +432,12 @@ void handle_xwayland_surface(struct wl_listener *listener, void *data) {
432 432
433 if (wlr_xwayland_surface_is_unmanaged(xsurface) || 433 if (wlr_xwayland_surface_is_unmanaged(xsurface) ||
434 xsurface->override_redirect) { 434 xsurface->override_redirect) {
435 wlr_log(L_DEBUG, "New xwayland unmanaged surface"); 435 wlr_log(WLR_DEBUG, "New xwayland unmanaged surface");
436 create_unmanaged(xsurface); 436 create_unmanaged(xsurface);
437 return; 437 return;
438 } 438 }
439 439
440 wlr_log(L_DEBUG, "New xwayland surface title='%s' class='%s'", 440 wlr_log(WLR_DEBUG, "New xwayland surface title='%s' class='%s'",
441 xsurface->title, xsurface->class); 441 xsurface->title, xsurface->class);
442 442
443 struct sway_xwayland_view *xwayland_view = 443 struct sway_xwayland_view *xwayland_view =
@@ -490,7 +490,7 @@ void handle_xwayland_ready(struct wl_listener *listener, void *data) {
490 xcb_connection_t *xcb_conn = xcb_connect(NULL, NULL); 490 xcb_connection_t *xcb_conn = xcb_connect(NULL, NULL);
491 int err = xcb_connection_has_error(xcb_conn); 491 int err = xcb_connection_has_error(xcb_conn);
492 if (err) { 492 if (err) {
493 wlr_log(L_ERROR, "XCB connect failed: %d", err); 493 wlr_log(WLR_ERROR, "XCB connect failed: %d", err);
494 return; 494 return;
495 } 495 }
496 496
@@ -509,7 +509,7 @@ void handle_xwayland_ready(struct wl_listener *listener, void *data) {
509 free(reply); 509 free(reply);
510 510
511 if (error != NULL) { 511 if (error != NULL) {
512 wlr_log(L_ERROR, "could not resolve atom %s, X11 error code %d", 512 wlr_log(WLR_ERROR, "could not resolve atom %s, X11 error code %d",
513 atom_map[i], error->error_code); 513 atom_map[i], error->error_code);
514 free(error); 514 free(error);
515 break; 515 break;