fix(awful.titlebar): honor the urgent state for titlebar buttons#4107
Open
keryell wants to merge 1 commit into
Open
fix(awful.titlebar): honor the urgent state for titlebar buttons#4107keryell wants to merge 1 commit into
keryell wants to merge 1 commit into
Conversation
The titlebar background and foreground already select an "urgent" variant via get_color(), but the button image widget only distinguished the "normal" and "focus" states and was not redrawn when a client's urgent property changed. An urgent client therefore kept showing its "normal" button images. Select button images by client state with graceful fallback (urgent -> focus -> normal), so themes that ship no dedicated urgent button images keep working unchanged, and redraw the buttons on property::urgent. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Aire-One
reviewed
Jun 19, 2026
Aire-One
left a comment
Member
There was a problem hiding this comment.
Changes seems reasonable to me. But the new behavior needs to be documented in the API doc and beautiful variables.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
awful.titlebaralready selects anurgentvariant for the titlebar background and foreground (viaget_color()), but the titlebar button widget (titlebar.widget.button) only distinguished thenormalandfocusstates, and was not redrawn when a client'surgentproperty changed. As a result, an urgent (but unfocused) client kept showing itsnormalbutton images on top of the urgent-colored titlebar background.Fix
urgent → focus → normal. Themes that ship dedicatedtitlebar_*_button_urgent*images get them; themes that don't fall back to the existingfocus/normalimages, so no existing theme changes behavior.property::urgent.Compatibility
The fallback keeps the lookup identical for the
normalandfocusstates on every existing theme. The default/xresources themes ship no_urgentbutton images, so urgent windows now show thefocusglyphs instead of thenormalones — matching the already-urgent-aware titlebar background/foreground.Testing
Built and ran on a live session (awesome
v4.3HEAD + this commit). Verified with a window forcedurgentwhile unfocused: the titlebar buttons now follow the urgent/focus image set and update immediately when the urgent flag is set or cleared; normal and focused windows render their buttons unchanged.🤖 Generated with Claude Code