Skip to content

Commit

Permalink
Account for decorations when FSP is active
Browse files Browse the repository at this point in the history
  • Loading branch information
tarek-y-ismail committed Dec 6, 2024
1 parent 28250c4 commit 56714dc
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/miral/minimal_window_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -645,8 +645,9 @@ void miral::MinimalWindowManager::Impl::apply_resize_by(Displacement movement)

bool miral::MinimalWindowManager::Impl::prevent_focus_stealing(miral::WindowInfo const& info)
{

auto const normal_app_without_parent = (info.depth_layer() == mir_depth_layer_application && !info.parent());
auto const decoration_surface = info.type() == mir_window_type_decoration;
return (focus_stealing == FocusStealing::prevent) && tools.active_window() &&
info.depth_layer() == mir_depth_layer_application && !info.parent() &&
(normal_app_without_parent || decoration_surface) &&
tools.active_window().application() != info.window().application();
}

0 comments on commit 56714dc

Please sign in to comment.