From 7b4c9c39eec2d7fc534541a31fa72a9e3e7a6b7a Mon Sep 17 00:00:00 2001 From: Isaac Freund Date: Sat, 26 Feb 2022 16:54:48 +0100 Subject: [PATCH] DragIcon: Properly initialize if already mapped --- river/DragIcon.zig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/river/DragIcon.zig b/river/DragIcon.zig index 66c73fe..3b5ab3d 100644 --- a/river/DragIcon.zig +++ b/river/DragIcon.zig @@ -46,6 +46,8 @@ pub fn init(drag_icon: *DragIcon, seat: *Seat, wlr_drag_icon: *wlr.Drag.Icon) vo wlr_drag_icon.events.unmap.add(&drag_icon.unmap); wlr_drag_icon.surface.events.new_subsurface.add(&drag_icon.new_subsurface); + if (wlr_drag_icon.mapped) handleMap(&drag_icon.map, wlr_drag_icon); + Subsurface.handleExisting(wlr_drag_icon.surface, .{ .drag_icon = drag_icon }); }