Update immediately titlebar background color on D-Bus profile switch - #1111
Merged
mattrose merged 1 commit intoSep 6, 2026
Merged
Conversation
When switching profile at runtime, for example through D-Bus using the command `remotinator switch_profile -p <profile>`, the titlebar color is not updated immediately. The color is only refreshed after the Terminator windows loses and regains focus. Terminal.reconfigure() calls Titlebar.update() without providing the current focus context, so profile-dependent titlebar colors are not recalculated. This change determines whether the toplevel window currently has input focus and update the titlebar accordingly.
Contributor
Author
|
I've discovered this issue trying to switch from local to remote server profile, with two different backgrounds to give a hint where we are: It's very convenient to update dynamically the profile. background and the title bar. As I'm using a bordeau / lie-de-vin bar for local machine, and a teal bar for the remote server, I've noticed the issue and tried to fix it, hence this patch. |
Contributor
Author
|
Can repro issue on:
On Wayland, the focus dance is more complicated to achieve: we need to do something forcing window redraw like set window to normal state and move it a little bit. Can repro the fix on both environments too. |
Member
|
Fixes the problem nicely, tysm |
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.
When switching profile at runtime, for example through D-Bus using the command
remotinator switch_profile -p <profile>, the titlebar color is not updated immediately. The color is only refreshed after the Terminator windows loses and regains focus.Terminal.reconfigure() calls Titlebar.update() without providing the current focus context, so profile-dependent titlebar colors are not recalculated.
This change determines whether the toplevel window currently has input focus and update the titlebar accordingly.