mirror of https://github.com/fairyglade/ly.git
Optimise event loop initialisation
Signed-off-by: AnErrupTion <anerruption@disroot.org>
This commit is contained in:
parent
dda56eab37
commit
abe72c74ff
|
|
@ -190,6 +190,8 @@ pub fn runEventLoop(
|
|||
var i: usize = 0;
|
||||
for (layers) |layer| {
|
||||
for (layer) |*widget| {
|
||||
try widget.update(context);
|
||||
|
||||
if (widget.vtable.handle_fn != null) {
|
||||
try self.handlable_widgets.append(allocator, widget);
|
||||
|
||||
|
|
@ -199,11 +201,6 @@ pub fn runEventLoop(
|
|||
}
|
||||
}
|
||||
|
||||
for (layers) |layer| {
|
||||
for (layer) |*widget| {
|
||||
try widget.update(context);
|
||||
}
|
||||
}
|
||||
try @call(.auto, position_widgets_fn, .{context});
|
||||
|
||||
var event: termbox.tb_event = undefined;
|
||||
|
|
|
|||
Loading…
Reference in New Issue