From ae763eae1c593e6943ee7e5ae6cfc7c06708f3fe Mon Sep 17 00:00:00 2001 From: TomZz Date: Thu, 18 Jun 2026 14:28:58 +0800 Subject: [PATCH] fix: title bar buttons unresponsive on windows in integrated mode --- src/app/ui.rs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/app/ui.rs b/src/app/ui.rs index bdfac5e..e576345 100644 --- a/src/app/ui.rs +++ b/src/app/ui.rs @@ -1,7 +1,7 @@ use gpui::{ Context, ElementId, Focusable as _, FontWeight, Hsla, InteractiveElement as _, IntoElement, MouseButton, MouseDownEvent, ParentElement as _, PathBuilder, Pixels, Render, - StatefulInteractiveElement as _, Styled as _, Window, WindowControlArea, canvas, div, hsla, + StatefulInteractiveElement as _, Styled as _, Window, canvas, div, hsla, point, prelude::FluentBuilder as _, px, rems, uniform_list, }; use gpui_component::{ @@ -1971,6 +1971,9 @@ impl Ashell { (g.id.clone(), g.title.clone(), pane_ids) }) .collect(); + let is_integrated = + self.active_title_bar_style == crate::session::config::TitleBarStyle::Integrated; + h_flex() .flex_1() .min_w(px(0.)) @@ -1982,6 +1985,9 @@ impl Ashell { .flex_1() .min_w(px(0.)) .h_full() + .when(is_integrated, |this| { + this.window_control_area(gpui::WindowControlArea::Drag) + }) .overflow_x_hidden() .child({ TabBar::new("ashell-tab-bar") @@ -2577,7 +2583,6 @@ impl Render for Ashell { .flex_1() .min_w(px(0.)) .h_full() - .window_control_area(WindowControlArea::Drag) .child(self.render_tab_bar(cx)), ), )