shell: disable WindowUI detection if constraint is active

This commit is contained in:
Skygrango 2026-05-27 14:17:01 +08:00 committed by Ian Douglas Scott
parent 208c2128cd
commit 203cad8cbd
8 changed files with 69 additions and 24 deletions

View file

@ -3145,6 +3145,7 @@ impl TilingLayout {
pub fn popup_element_under(
&self,
location_f64: Point<f64, Local>,
seat: &Seat<State>,
) -> Option<KeyboardFocusTarget> {
let location = location_f64.to_i32_round();
@ -3157,6 +3158,7 @@ impl TilingLayout {
.focus_under(
(location_f64 - geo.loc.to_f64()).as_logical() + mapped.geometry().loc.to_f64(),
WindowSurfaceType::POPUP | WindowSurfaceType::SUBSURFACE,
seat,
)
.is_some()
{
@ -3170,6 +3172,7 @@ impl TilingLayout {
pub fn toplevel_element_under(
&self,
location_f64: Point<f64, Local>,
seat: &Seat<State>,
) -> Option<KeyboardFocusTarget> {
let location = location_f64.to_i32_round();
@ -3182,6 +3185,7 @@ impl TilingLayout {
.focus_under(
(location_f64 - geo.loc.to_f64()).as_logical() + mapped.geometry().loc.to_f64(),
WindowSurfaceType::TOPLEVEL | WindowSurfaceType::SUBSURFACE,
seat,
)
.is_some()
{
@ -3196,6 +3200,7 @@ impl TilingLayout {
&self,
location_f64: Point<f64, Local>,
overview: OverviewMode,
seat: &Seat<State>,
) -> Option<(PointerFocusTarget, Point<f64, Local>)> {
let location = location_f64.to_i32_round();
@ -3210,6 +3215,7 @@ impl TilingLayout {
if let Some((target, surface_offset)) = mapped.focus_under(
(location_f64 - geo.loc.to_f64()).as_logical() + mapped.geometry().loc.to_f64(),
WindowSurfaceType::POPUP | WindowSurfaceType::SUBSURFACE,
seat,
) {
return Some((
target,
@ -3227,6 +3233,7 @@ impl TilingLayout {
&self,
location_f64: Point<f64, Local>,
overview: OverviewMode,
seat: &Seat<State>,
) -> Option<(PointerFocusTarget, Point<f64, Local>)> {
let tree = &self.queue.trees.back().unwrap().0;
let root = tree.root_node_id()?;
@ -3243,6 +3250,7 @@ impl TilingLayout {
if let Some((target, surface_offset)) = mapped.focus_under(
(location_f64 - geo.loc.to_f64()).as_logical() + mapped.geometry().loc.to_f64(),
WindowSurfaceType::TOPLEVEL | WindowSurfaceType::SUBSURFACE,
seat,
) {
return Some((
target,
@ -3293,6 +3301,7 @@ impl TilingLayout {
.focus_under(
test_point,
WindowSurfaceType::TOPLEVEL | WindowSurfaceType::SUBSURFACE,
seat,
)
.map(|(surface, surface_offset)| {
(