Skip to content

Commit

Permalink
Raise scene nodes when windows are activated, not just focused
Browse files Browse the repository at this point in the history
  • Loading branch information
serebit committed Jul 4, 2024
1 parent 80da739 commit e51fdd1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ void Server::focus_view(std::shared_ptr<View>&& view, wlr_surface* surface) {
}

/* Move the view to the front */
wlr_scene_node_raise_to_top(view->scene_node);
views.remove(view);
for (const auto& it : views) {
it->set_activated(false);
Expand Down
4 changes: 4 additions & 0 deletions src/surface/view.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,10 @@ void View::set_activated(const bool activated) {
if (toplevel_handle.has_value()) {
toplevel_handle->set_activated(activated);
}

if (activated) {
wlr_scene_node_raise_to_top(scene_node);
}
}

void View::set_placement(const ViewPlacement new_placement, const bool force) {
Expand Down

0 comments on commit e51fdd1

Please sign in to comment.