From 6942ecc13a40867850fc26429da21603647e8026 Mon Sep 17 00:00:00 2001 From: Ivan Molodetskikh Date: Mon, 10 Feb 2025 13:12:53 +0300 Subject: Implement clicking on tab to switch --- src/layout/mod.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/layout/mod.rs') diff --git a/src/layout/mod.rs b/src/layout/mod.rs index ae338ced..4dec85f6 100644 --- a/src/layout/mod.rs +++ b/src/layout/mod.rs @@ -466,7 +466,10 @@ pub enum HitType { /// The hit can activate a window, but it is not in the input region so cannot send events. /// /// For example, this could be clicking on a tile border outside the window. - Activate, + Activate { + /// Whether the hit was on the tab indicator. + is_tab_indicator: bool, + }, } impl InteractiveMoveState { @@ -515,7 +518,7 @@ impl HitType { pub fn offset_win_pos(mut self, offset: Point) -> Self { match &mut self { HitType::Input { win_pos } => *win_pos += offset, - HitType::Activate => (), + HitType::Activate { .. } => (), } self } -- cgit