Skip to content

Commit d3c80f1

Browse files
Updated to custom window handlers works better
1 parent 1b8c318 commit d3c80f1

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/window.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -414,6 +414,12 @@ impl Window {
414414
self.events.push(event);
415415
}
416416

417+
/// Clears events, usefull for handling issues with
418+
/// custom event insertions or handlers
419+
pub fn clear_events(&mut self) {
420+
self.events.clear();
421+
}
422+
417423
/// Returns the current event for the frame, as a reference.
418424
pub fn events(&self) -> &Vec<Event> {
419425
&self.events

0 commit comments

Comments
 (0)