Skip to content

Commit

Permalink
Rename WindowEvent::Refresh to WindowEvent::Redraw
Browse files Browse the repository at this point in the history
  • Loading branch information
Osspial committed Nov 9, 2018
1 parent 529c085 commit 64b8a9c
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/events.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ pub enum WindowEvent {
AxisMotion { device_id: DeviceId, axis: AxisId, value: f64 },

/// The window needs to be redrawn.
Refresh,
Redraw,

/// Touch event has been received
Touch(Touch),
Expand Down
2 changes: 1 addition & 1 deletion src/platform/android/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ impl EventLoop {
// The activity needs to be redrawn.
Some(Event::WindowEvent {
window_id: RootWindowId(WindowId),
event: WindowEvent::Refresh,
event: WindowEvent::Redraw,
})
}
android_glue::Event::Wake => {
Expand Down
2 changes: 1 addition & 1 deletion src/platform/linux/wayland/event_loop.rs
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ impl EventLoop {
sink.send_event(::WindowEvent::HiDpiFactorChanged(dpi as f64), wid);
}
if refresh {
sink.send_event(::WindowEvent::Refresh, wid);
sink.send_event(::WindowEvent::Redraw, wid);
}
if closed {
sink.send_event(::WindowEvent::CloseRequested, wid);
Expand Down
2 changes: 1 addition & 1 deletion src/platform/linux/x11/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -580,7 +580,7 @@ impl EventLoop {
let window = xev.window;
let window_id = mkwid(window);

callback(Event::WindowEvent { window_id, event: WindowEvent::Refresh });
callback(Event::WindowEvent { window_id, event: WindowEvent::Redraw });
}

ffi::KeyPress | ffi::KeyRelease => {
Expand Down
4 changes: 2 additions & 2 deletions src/platform/windows/events_loop.rs
Original file line number Diff line number Diff line change
Expand Up @@ -480,10 +480,10 @@ pub unsafe extern "system" fn callback(
},

winuser::WM_PAINT => {
use events::WindowEvent::Refresh;
use events::WindowEvent::Redraw;
send_event(Event::WindowEvent {
window_id: SuperWindowId(WindowId(window)),
event: Refresh,
event: Redraw,
});
winuser::DefWindowProcW(window, msg, wparam, lparam)
},
Expand Down

0 comments on commit 64b8a9c

Please sign in to comment.