aboutsummaryrefslogtreecommitdiff
path: root/src/layout/tile.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/layout/tile.rs')
-rw-r--r--src/layout/tile.rs7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/layout/tile.rs b/src/layout/tile.rs
index 56af4fa4..ea8515af 100644
--- a/src/layout/tile.rs
+++ b/src/layout/tile.rs
@@ -6,7 +6,7 @@ use smithay::backend::renderer::element::solid::{SolidColorBuffer, SolidColorRen
use smithay::backend::renderer::element::utils::{Relocate, RelocateRenderElement};
use smithay::backend::renderer::element::Kind;
use smithay::backend::renderer::{ImportAll, Renderer};
-use smithay::utils::{Logical, Point, Scale, Size};
+use smithay::utils::{Logical, Point, Rectangle, Scale, Size};
use super::focus_ring::FocusRing;
use super::workspace::WorkspaceRenderElement;
@@ -150,6 +150,11 @@ impl<W: LayoutElement> Tile<W> {
self.window.is_in_input_region(point)
}
+ pub fn is_in_activation_region(&self, point: Point<f64, Logical>) -> bool {
+ let activation_region = Rectangle::from_loc_and_size((0, 0), self.tile_size());
+ activation_region.to_f64().contains(point)
+ }
+
pub fn request_tile_size(&mut self, mut size: Size<i32, Logical>) {
// Can't go through effective_border_width() because we might be fullscreen.
if !self.border.is_off() {