Skip to content

Commit 06a1fe4

Browse files
Remove Event::Shown and Event::Hidden
Their behaviour seems platform-specific, and they're only consistently triggered via code rather than user interactions, so there's not a lot of point to having them.
1 parent 33e25ca commit 06a1fe4

File tree

2 files changed

+0
-21
lines changed

2 files changed

+0
-21
lines changed

src/lifecycle.rs

-13
Original file line numberDiff line numberDiff line change
@@ -62,19 +62,6 @@ pub enum Event {
6262
height: i32,
6363
},
6464

65-
/// The game window was shown.
66-
///
67-
/// This event will fire once at startup. It will not be fired again
68-
/// subsequently unless [`window::set_visible`](crate::window::set_visible)
69-
/// is called.
70-
Shown,
71-
72-
/// The game window was hidden.
73-
///
74-
/// This event will only fire if [`window::set_visible`](crate::window::set_visible)
75-
/// is called.
76-
Hidden,
77-
7865
/// The game window was restored to normal size and position by the user, either by
7966
/// un-minimizing or un-maximizing.
8067
Restored,

src/platform/window_sdl.rs

-8
Original file line numberDiff line numberDiff line change
@@ -427,14 +427,6 @@ where
427427
state.event(ctx, Event::Resized { width, height })?;
428428
}
429429

430-
WindowEvent::Shown => {
431-
state.event(ctx, Event::Shown)?;
432-
}
433-
434-
WindowEvent::Hidden => {
435-
state.event(ctx, Event::Hidden)?;
436-
}
437-
438430
WindowEvent::Restored => {
439431
state.event(ctx, Event::Restored)?;
440432
}

0 commit comments

Comments
 (0)