fix: use output scale for tab bar text rendering on HiDPI displays

mango_tab_bar_node_update was called with a hardcoded scale of 1.0 in
both client_add_tab_bar_node and updatetitle.  On HiDPI outputs the
compositor scales the resulting 1x buffer up, producing blurry text.

Pass the client's output scale (wlr_output->scale) instead, falling
back to 1.0 when the client has no monitor assigned yet.
This commit is contained in:
Emilia Miki 2026-06-23 02:29:24 +03:00
parent eb9b5ca8cc
commit 8bd20edb63
2 changed files with 2 additions and 2 deletions

View file

@ -118,5 +118,5 @@ void client_add_tab_bar_node(Client *c) {
mangonodedata, layers[LyrDecorate], config.tabdata, 0, 0);
wlr_scene_node_lower_to_bottom(&c->tab_bar_node->scene_buffer->node);
wlr_scene_node_set_enabled(&c->tab_bar_node->scene_buffer->node, false);
mango_tab_bar_node_update(c->tab_bar_node, client_get_title(c), 1.0);
mango_tab_bar_node_update(c->tab_bar_node, client_get_title(c), c->mon ? c->mon->wlr_output->scale : 1.0f);
}

View file

@ -6736,7 +6736,7 @@ void updatetitle(struct wl_listener *listener, void *data) {
const char *title;
title = client_get_title(c);
mango_tab_bar_node_update(c->tab_bar_node, title, 1.0);
mango_tab_bar_node_update(c->tab_bar_node, title, c->mon ? c->mon->wlr_output->scale : 1.0f);
if (title && c->foreign_toplevel)
wlr_foreign_toplevel_handle_v1_set_title(c->foreign_toplevel, title);
if (c == focustop(c->mon))