linux/x11: Give title bar inactive bg on mouse down (#18529)

This fixes something that I felt was off for a while. Previously, when
you'd click on the titlebar to move the window, the titlebar would only
change its background once the moving starts, but not on mouse-down.

That felt really off, since the moving is down with mouse-down and move,
so I think giving the user feedback about the mouse-down event makes
more sense.

I know there's a subjectivity to this change, so I'm ready to hear other
opinions, but for now I want to go with this.

Release Notes:

- N/A
This commit is contained in:
Thorsten Ball 2024-09-30 12:39:11 +02:00 committed by GitHub
parent 533416c5a9
commit 65f6a7e5bc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -76,7 +76,7 @@ impl Render for TitleBar {
let supported_controls = cx.window_controls();
let decorations = cx.window_decorations();
let titlebar_color = if cfg!(target_os = "linux") {
if cx.is_window_active() {
if cx.is_window_active() && !self.should_move {
cx.theme().colors().title_bar_background
} else {
cx.theme().colors().title_bar_inactive_background