aboutsummaryrefslogtreecommitdiff
path: root/src/layout/mod.rs
diff options
context:
space:
mode:
authorIvan Molodetskikh <yalterz@gmail.com>2025-02-10 13:12:53 +0300
committerIvan Molodetskikh <yalterz@gmail.com>2025-02-10 07:29:33 -0800
commit6942ecc13a40867850fc26429da21603647e8026 (patch)
treefaa00e99985eb8d24acb09235d93b7fe2822b301 /src/layout/mod.rs
parent963ff14ed025eeb5d6785dbcd4c073251ef7a9e9 (diff)
downloadniri-6942ecc13a40867850fc26429da21603647e8026.tar.gz
niri-6942ecc13a40867850fc26429da21603647e8026.tar.bz2
niri-6942ecc13a40867850fc26429da21603647e8026.zip
Implement clicking on tab to switch
Diffstat (limited to 'src/layout/mod.rs')
-rw-r--r--src/layout/mod.rs7
1 files changed, 5 insertions, 2 deletions
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<W: LayoutElement> InteractiveMoveState<W> {
@@ -515,7 +518,7 @@ impl HitType {
pub fn offset_win_pos(mut self, offset: Point<f64, Logical>) -> Self {
match &mut self {
HitType::Input { win_pos } => *win_pos += offset,
- HitType::Activate => (),
+ HitType::Activate { .. } => (),
}
self
}