aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Tobias Langendorf <junglerobba@jngl.one>2021-05-17 10:32:27 +0200
committerLibravatar Kenny Levinsen <kl@kl.wtf>2021-06-24 18:10:01 +0200
commit1766ae3f44b5d3c59d417399b152dfd6c8eba97a (patch)
tree2e42fcd40032827690acf2bffbea33d5d01d2a0b
parentmeson: libseat is no longer optional (diff)
downloadsway-1766ae3f44b5d3c59d417399b152dfd6c8eba97a.tar.gz
sway-1766ae3f44b5d3c59d417399b152dfd6c8eba97a.tar.zst
sway-1766ae3f44b5d3c59d417399b152dfd6c8eba97a.zip
remove usage of `wlr_texture_get_size`
-rw-r--r--sway/desktop/render.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/sway/desktop/render.c b/sway/desktop/render.c
index 46622224..a105ffba 100644
--- a/sway/desktop/render.c
+++ b/sway/desktop/render.c
@@ -488,9 +488,10 @@ static void render_titlebar(struct sway_output *output,
488 int ob_marks_x = 0; // output-buffer-local 488 int ob_marks_x = 0; // output-buffer-local
489 int ob_marks_width = 0; // output-buffer-local 489 int ob_marks_width = 0; // output-buffer-local
490 if (config->show_marks && marks_texture) { 490 if (config->show_marks && marks_texture) {
491 struct wlr_box texture_box; 491 struct wlr_box texture_box = {
492 wlr_texture_get_size(marks_texture, 492 .width = marks_texture->width,
493 &texture_box.width, &texture_box.height); 493 .height = marks_texture->height,
494 };
494 ob_marks_width = texture_box.width; 495 ob_marks_width = texture_box.width;
495 496
496 // The marks texture might be shorter than the config->font_height, in 497 // The marks texture might be shorter than the config->font_height, in
@@ -541,9 +542,10 @@ static void render_titlebar(struct sway_output *output,
541 int ob_title_x = 0; // output-buffer-local 542 int ob_title_x = 0; // output-buffer-local
542 int ob_title_width = 0; // output-buffer-local 543 int ob_title_width = 0; // output-buffer-local
543 if (title_texture) { 544 if (title_texture) {
544 struct wlr_box texture_box; 545 struct wlr_box texture_box = {
545 wlr_texture_get_size(title_texture, 546 .width = title_texture->width,
546 &texture_box.width, &texture_box.height); 547 .height = title_texture->height,
548 };
547 549
548 // The effective output may be NULL when con is not on any output. 550 // The effective output may be NULL when con is not on any output.
549 // This can happen because we render all children of containers, 551 // This can happen because we render all children of containers,