DragIcon: Properly initialize if already mapped

This commit is contained in:
Isaac Freund 2022-02-26 16:54:48 +01:00
parent 1c1be3e0bb
commit 7b4c9c39ee
No known key found for this signature in database
GPG Key ID: 86DED400DDFD7A11

View File

@ -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.events.unmap.add(&drag_icon.unmap);
wlr_drag_icon.surface.events.new_subsurface.add(&drag_icon.new_subsurface); 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 }); Subsurface.handleExisting(wlr_drag_icon.surface, .{ .drag_icon = drag_icon });
} }