summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Drew DeVault <sir@cmpwn.com>2018-07-30 08:05:14 -0400
committerLibravatar GitHub <noreply@github.com>2018-07-30 08:05:14 -0400
commit5f8676f21478a05c349f0222755e999e2f457acc (patch)
treef1758d634c85ac5772e26d91078e892e596a6c40
parentEnable unstable wlroots features (diff)
parentFix title textures on scale change (diff)
downloadsway-5f8676f21478a05c349f0222755e999e2f457acc.tar.gz
sway-5f8676f21478a05c349f0222755e999e2f457acc.tar.zst
sway-5f8676f21478a05c349f0222755e999e2f457acc.zip
Merge pull request #2383 from RedSoxFan/fix-title-scale
Fix title textures on scale change
-rw-r--r--include/sway/tree/container.h2
-rw-r--r--sway/desktop/output.c6
-rw-r--r--sway/tree/container.c6
3 files changed, 8 insertions, 6 deletions
diff --git a/include/sway/tree/container.h b/include/sway/tree/container.h
index d91b3bf1..d4a42a71 100644
--- a/include/sway/tree/container.h
+++ b/include/sway/tree/container.h
@@ -270,6 +270,8 @@ int container_count_descendants_of_type(struct sway_container *con,
270 270
271void container_create_notify(struct sway_container *container); 271void container_create_notify(struct sway_container *container);
272 272
273void container_update_textures_recursive(struct sway_container *con);
274
273void container_damage_whole(struct sway_container *container); 275void container_damage_whole(struct sway_container *container);
274 276
275bool container_reap_empty(struct sway_container *con); 277bool container_reap_empty(struct sway_container *con);
diff --git a/sway/desktop/output.c b/sway/desktop/output.c
index cecd300a..fb52e7b1 100644
--- a/sway/desktop/output.c
+++ b/sway/desktop/output.c
@@ -506,14 +506,10 @@ static void handle_transform(struct wl_listener *listener, void *data) {
506 transaction_commit_dirty(); 506 transaction_commit_dirty();
507} 507}
508 508
509static void handle_scale_iterator(struct sway_container *view, void *data) {
510 view_update_marks_textures(view->sway_view);
511}
512
513static void handle_scale(struct wl_listener *listener, void *data) { 509static void handle_scale(struct wl_listener *listener, void *data) {
514 struct sway_output *output = wl_container_of(listener, output, scale); 510 struct sway_output *output = wl_container_of(listener, output, scale);
515 arrange_layers(output); 511 arrange_layers(output);
516 container_descendants(output->swayc, C_VIEW, handle_scale_iterator, NULL); 512 container_update_textures_recursive(output->swayc);
517 arrange_windows(output->swayc); 513 arrange_windows(output->swayc);
518 transaction_commit_dirty(); 514 transaction_commit_dirty();
519} 515}
diff --git a/sway/tree/container.c b/sway/tree/container.c
index b7442002..4e85021d 100644
--- a/sway/tree/container.c
+++ b/sway/tree/container.c
@@ -67,7 +67,7 @@ void container_create_notify(struct sway_container *container) {
67 } 67 }
68} 68}
69 69
70static void container_update_textures_recursive(struct sway_container *con) { 70void container_update_textures_recursive(struct sway_container *con) {
71 if (con->type == C_CONTAINER || con->type == C_VIEW) { 71 if (con->type == C_CONTAINER || con->type == C_VIEW) {
72 container_update_title_textures(con); 72 container_update_title_textures(con);
73 } 73 }
@@ -79,6 +79,10 @@ static void container_update_textures_recursive(struct sway_container *con) {
79 struct sway_container *child = con->children->items[i]; 79 struct sway_container *child = con->children->items[i];
80 container_update_textures_recursive(child); 80 container_update_textures_recursive(child);
81 } 81 }
82
83 if (con->type == C_WORKSPACE) {
84 container_update_textures_recursive(con->sway_workspace->floating);
85 }
82 } 86 }
83} 87}
84 88