Skip to content

Commit

Permalink
Account for layer when checking focus stealing for both apps and
Browse files Browse the repository at this point in the history
decorations
  • Loading branch information
tarek-y-ismail committed Dec 18, 2024
1 parent a6bcb13 commit 9738863
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/miral/minimal_window_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -640,9 +640,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 without_parent = !info.parent();
auto const decoration_surface = info.type() == mir_window_type_decoration;
return (focus_stealing == FocusStealing::prevent) && tools.active_window() &&
(normal_app_without_parent || decoration_surface) &&
(without_parent || decoration_surface) && info.depth_layer() == mir_depth_layer_application &&
tools.active_window().application() != info.window().application();
}

0 comments on commit 9738863

Please sign in to comment.