Skip to content

Commit e51fdd1

Browse files
committed
Raise scene nodes when windows are activated, not just focused
1 parent 80da739 commit e51fdd1

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

src/server.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@ void Server::focus_view(std::shared_ptr<View>&& view, wlr_surface* surface) {
6060
}
6161

6262
/* Move the view to the front */
63-
wlr_scene_node_raise_to_top(view->scene_node);
6463
views.remove(view);
6564
for (const auto& it : views) {
6665
it->set_activated(false);

src/surface/view.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,10 @@ void View::set_activated(const bool activated) {
220220
if (toplevel_handle.has_value()) {
221221
toplevel_handle->set_activated(activated);
222222
}
223+
224+
if (activated) {
225+
wlr_scene_node_raise_to_top(scene_node);
226+
}
223227
}
224228

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

0 commit comments

Comments
 (0)