Skip to content

Commit

Permalink
X11: Flatten window model (#536)
Browse files Browse the repository at this point in the history
  • Loading branch information
francesca64 authored May 29, 2018
1 parent 30f798b commit 4372f6f
Show file tree
Hide file tree
Showing 5 changed files with 362 additions and 446 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Unreleased

- On X11, the `Moved` event is no longer sent when the window is resized without changing position.
- `MouseCursor` and `CursorState` now implement `Default`.

# Version 0.15.0 (2018-05-22)

- `Icon::to_cardinals` is no longer public, since it was never supposed to be.
Expand Down
12 changes: 12 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,12 @@ pub enum MouseCursor {
RowResize,
}

impl Default for MouseCursor {
fn default() -> Self {
MouseCursor::Default
}
}

/// Describes how winit handles the cursor.
#[derive(Debug, Copy, Clone, PartialEq)]
pub enum CursorState {
Expand All @@ -391,6 +397,12 @@ pub enum CursorState {
Grab,
}

impl Default for CursorState {
fn default() -> Self {
CursorState::Normal
}
}

/// Attributes to use when creating a window.
#[derive(Clone)]
pub struct WindowAttributes {
Expand Down
Loading

0 comments on commit 4372f6f

Please sign in to comment.