Skip to content

Commit 925801e

Browse files
committed
Raise popups to top when they're mapped
1 parent 8f494e1 commit 925801e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/surface/popup.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ static void popup_map_notify(wl_listener* listener, [[maybe_unused]] void* data)
2626
wlr_surface_send_enter(popup.wlr->base->surface, &output->wlr);
2727
}
2828
}
29+
30+
wlr_scene_node_raise_to_top(popup.scene_node);
2931
}
3032

3133
static void popup_destroy_notify(wl_listener* listener, [[maybe_unused]] void* data) {
@@ -47,7 +49,7 @@ static void popup_new_popup_notify(wl_listener* listener, void* data) {
4749

4850
Popup::Popup(Surface& parent, wlr_xdg_popup& wlr) noexcept
4951
: listeners(*this), server(parent.get_server()), parent(parent), wlr(&wlr) {
50-
auto* scene_tree = wlr_scene_xdg_surface_create(parent.scene_node->parent, wlr.base);
52+
auto* scene_tree = wlr_scene_xdg_surface_create(wlr_scene_tree_from_node(parent.scene_node), wlr.base);
5153
scene_node = &scene_tree->node;
5254

5355
scene_node->data = this;

0 commit comments

Comments
 (0)