From ff6f7276318e71a9537d600f281470014ae9629d Mon Sep 17 00:00:00 2001 From: Matias-Hall <55637804+Matias-Hall@users.noreply.github.com> Date: Mon, 5 Jun 2023 18:29:19 +0800 Subject: [PATCH] river/window: Add tooltip. --- src/modules/river/window.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/modules/river/window.cpp b/src/modules/river/window.cpp index d93938c1..dc7a6459 100644 --- a/src/modules/river/window.cpp +++ b/src/modules/river/window.cpp @@ -106,7 +106,11 @@ void Window::handle_focused_view(const char *title) { label_.hide(); // hide empty labels or labels with empty format } else { label_.show(); - label_.set_markup(fmt::format(fmt::runtime(format_), Glib::Markup::escape_text(title).raw())); + auto text = fmt::format(fmt::runtime(format_), Glib::Markup::escape_text(title).raw()); + label_.set_markup(text); + if (tooltipEnabled()) { + label_.set_tooltip_markup(text); + } } ALabel::update();