Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Winit version 0.29.2 #3160

Merged
merged 80 commits into from
Oct 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
80 commits
Select commit Hold shift + click to select a range
2842793
Implement `PartialOrd`/`Ord` for `KeyCode`/`NativeKeyCode`
StarStarJ Jul 1, 2023
2c07f21
Fix recent CI failures (#3041)
madsmtm Aug 24, 2023
d24b473
Use `frame` instead of `visibleRect` (#3043)
madsmtm Aug 24, 2023
26ce0ef
Use `setTimeout()` trick instead of `Window.requestIdleCallback()` (#…
daxpedda Aug 25, 2023
67de182
On Web, never return a `MonitorHandle` (#3051)
daxpedda Aug 26, 2023
fa85850
Move `Event::RedrawRequested` to `WindowEvent` (#3049)
daxpedda Aug 27, 2023
affbd99
Improve CI caching, and give each job names
madsmtm Aug 27, 2023
c34ca34
Make iOS fully thread safe (#3045)
madsmtm Aug 27, 2023
33c7931
Lock the cargo-apk deps on CI
kchibisov Aug 27, 2023
b7f84c6
Fix macOS deminiaturize (#3054)
madsmtm Aug 27, 2023
b5953f1
Enable event propagation (#3062)
daxpedda Aug 28, 2023
e96152e
Web: Fullscreen Overhaul (#3063)
daxpedda Aug 29, 2023
cc303be
Implement X11 extensions using x11rb instead of Xlib
notgull Aug 29, 2023
8373bfa
Fix missing quote (#3068)
madsmtm Aug 30, 2023
c8661f4
Ensure that winit initializes NSApplication (#3069)
madsmtm Aug 30, 2023
ac09862
Make EventLoopWindowTarget independent of the user type on Orbital (#…
madsmtm Aug 30, 2023
730d8e4
On Wayland, fix TouchPhase::Canceled sent for Move
kchibisov Aug 31, 2023
7406acc
Slightly reduce number of `cfg`s (#3071)
madsmtm Sep 1, 2023
604dfe3
Mark `startup_notify` unsafe functions as safe
kchibisov Sep 1, 2023
b9ba73d
Remove `T` from `EventLoopTargetWindow` (#3081)
daxpedda Sep 3, 2023
0c1bae3
Allow the user to force X11 under Wayland
notgull Sep 3, 2023
b4a597c
Move `ControlFlow` to `EventLoopWindowTarget`
daxpedda Sep 7, 2023
d2fa3f3
Revert select_xkb_events to its previous impl
notgull Sep 7, 2023
404fc46
Correct set_exit() -> exit() in the changelog (#3088)
fornwall Sep 7, 2023
ed5d0a2
Add `Window.requestIdleCallback()` support (#3084)
daxpedda Sep 7, 2023
bfff708
Add an MSRV policy to the README (#3046)
notgull Sep 8, 2023
bb54a8c
Rename `PollType` to `PollStrategy` (#3089)
daxpedda Sep 8, 2023
aff8647
Ignore foreign-types* duplicate deps on macOS
daxpedda Sep 16, 2023
8534721
Install `cargo-apk` with the stable toolchain
daxpedda Sep 16, 2023
72f2212
Correct Wayland section in dpi docs
kchibisov Sep 16, 2023
7d2d889
Implement `PartialOrd` and `Ord` for `MouseButton`
StarStarJ Sep 17, 2023
db9e1f2
On X11, fix WaitUntil and Poll behavior
Riateche Sep 20, 2023
3862da8
Remove old docs about EventLoop::run
kchibisov Sep 22, 2023
9fac792
Make `ControlFlow::Wait` the default (#3106)
daxpedda Sep 22, 2023
eef63d6
Pass force on touch events on android
lucasmerlin Sep 22, 2023
7c86e5c
Remove `DeviceEvent::Text` event
kchibisov Sep 23, 2023
ea2702b
Fix transparent windows on X11
macmv Sep 25, 2023
597b4e3
Bump version on master (#3119)
madsmtm Sep 27, 2023
cd114c5
Windows: Add #[deny(unsafe_op_in_unsafe_fn)] (#3070)
madsmtm Sep 29, 2023
88914de
X11: Add `#[deny(unsafe_op_in_unsafe_fn)]` (#3121)
madsmtm Sep 30, 2023
1280170
Link to areweguiyet.com and arewegameyet.rs for extra deps
madsmtm Oct 3, 2023
96fe308
Make DeviceId contain device id's on Android
fornwall Oct 3, 2023
f4e66b4
Rename run_ondemand to run_on_demand
epimeletes Oct 3, 2023
9ea0daa
Update Clippy to v1.73 (#3135)
daxpedda Oct 7, 2023
8011b7d
Web: remove unnecessary usage of `once_cell::unsync::Lazy` (#3134)
daxpedda Oct 8, 2023
47220ae
Add `Window::set_blur`
dsseng Oct 8, 2023
4df6cc1
Web: fix `ControlFlow::WaitUntil` to never wake up **before** the giv…
daxpedda Oct 9, 2023
cc3e898
Remove obsolete docs about wayland CSD env variable
kchibisov Oct 10, 2023
b96577d
On Wayland, fix MonitorHandle position
EvinceMoi Oct 10, 2023
becfdd8
Fix reset to `Poll` after the event loop starts
daxpedda Oct 10, 2023
6f6dba6
Add `Window::show_window_menu`
YouKnow-sys Oct 10, 2023
351e9ea
Add Occluded and MemoryWarning events for iOS/Android
mockersf Oct 12, 2023
cd3a30e
Fix CHANGELOG entry for Event::MemoryWarning
kchibisov Oct 12, 2023
d13dcee
feat: Implement set_cursor_hittest for X11
lunixbochs Oct 14, 2023
4f74082
Update to new raw-window-handle strategy
notgull Oct 15, 2023
ae28671
Fix ndk deps versions
kchibisov Oct 15, 2023
90502a4
Update SCTK to 0.18.0
kchibisov Oct 15, 2023
5787085
Fix potentially unaligned references in X11 device
notgull Oct 15, 2023
2d8e380
Implement `AsFd`/`AsRawFd` for `EventLoop<T>`
kchibisov Oct 15, 2023
eaf2346
Add a note on `Window::request_redraw` on Windows
kchibisov Oct 15, 2023
6f072d5
Web Async Rework (#3082)
daxpedda Oct 16, 2023
c21d5f8
Upgrade to `ndk 0.8`, `ndk-sys 0.5` + `android-activity 0.5` releases
MarijnS95 Oct 17, 2023
0877385
Remove resolved deny.toml entries
kchibisov Oct 17, 2023
c0c7f91
Make `WindowBuilder` `Send + Sync`
kchibisov Oct 17, 2023
537fe8d
On macOS, fix globe key triggering assertion
kchibisov Oct 17, 2023
9c27e64
On Windows, fix `CursorEntered`/`CursorLeft` not sent during mouse grab
YouKnow-sys Oct 17, 2023
837dac9
Fix examples not render on Wayland
kchibisov Oct 17, 2023
7a23c5c
Ensure that DISPLAY vars are non-empty before using
kchibisov Oct 19, 2023
ed77661
Revise Key and KeyCode enums
dhardy Oct 19, 2023
dd6798c
Remove garbage from README
kchibisov Oct 19, 2023
699a675
On macOS, fix tabGroup misuse
kchibisov Oct 20, 2023
8f8954c
On iOS, add configuration for status bar style
arendjr Oct 20, 2023
f2f2a70
On Windows, fix invalid hmonitor panic
xiaopengli89 Oct 20, 2023
0a600c9
Implement `Ord`/`PartialOrd` for `ModifiersState`
dhardy Oct 20, 2023
9e94645
On Windows, fix `RedrawRequested` delivery
kchibisov Oct 20, 2023
ed4245e
On Windows, fix IME APIs MT-safety
kchibisov Oct 20, 2023
43978f3
feat(windows): Fix inconsistency in mouse button device events, add h…
valaphee Oct 20, 2023
c538dd1
Fix rwhd_05 doc links
dhardy Oct 21, 2023
22ea7fe
On X11, fix cursor_hittest not reloaded on Resize
kchibisov Oct 21, 2023
7a9d733
Winit version 0.29.2
kchibisov Oct 17, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
214 changes: 125 additions & 89 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,146 +6,182 @@ on:
branches: [master]

jobs:
Check_Formatting:
fmt:
name: Check formatting
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: hecrj/setup-rust-action@v1
- uses: dtolnay/rust-toolchain@stable
with:
rust-version: stable
components: rustfmt
- name: Check Formatting
run: cargo +stable fmt --all -- --check

cargo-deny:
name: cargo-deny

# TODO: remove this matrix when https://github.com/EmbarkStudios/cargo-deny/issues/324 is resolved
strategy:
fail-fast: false
matrix:
platform:
- aarch64-apple-ios
- aarch64-linux-android
- i686-pc-windows-gnu
- i686-pc-windows-msvc
- i686-unknown-linux-gnu
- wasm32-unknown-unknown
- x86_64-apple-darwin
- x86_64-apple-ios
- x86_64-pc-windows-gnu
- x86_64-pc-windows-msvc
- x86_64-unknown-linux-gnu
- x86_64-unknown-redox

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: EmbarkStudios/cargo-deny-action@v1
with:
command: check
log-level: error
arguments: --all-features --target ${{ matrix.platform }}
run: cargo fmt -- --check

tests:
name: Tests
name: Test ${{ matrix.toolchain }} ${{ matrix.platform.name }}
runs-on: ${{ matrix.platform.os }}

strategy:
fail-fast: false
matrix:
rust_version: ['1.65.0', stable, nightly]
toolchain: [stable, nightly, '1.65.0']
platform:
# Note: Make sure that we test all the `docs.rs` targets defined in Cargo.toml!
- { target: x86_64-pc-windows-msvc, os: windows-latest, }
- { target: i686-pc-windows-msvc, os: windows-latest, }
- { target: x86_64-pc-windows-gnu, os: windows-latest, host: -x86_64-pc-windows-gnu }
- { target: i686-pc-windows-gnu, os: windows-latest, host: -i686-pc-windows-gnu }
- { target: i686-unknown-linux-gnu, os: ubuntu-latest, }
- { target: x86_64-unknown-linux-gnu, os: ubuntu-latest, }
- { target: x86_64-unknown-linux-gnu, os: ubuntu-latest, options: --no-default-features, features: x11 }
- { target: x86_64-unknown-linux-gnu, os: ubuntu-latest, options: --no-default-features, features: "wayland,wayland-dlopen" }
- { target: aarch64-linux-android, os: ubuntu-latest, options: -p winit, cmd: 'apk --', features: "android-native-activity" }
- { target: x86_64-unknown-redox, os: ubuntu-latest, }
- { target: x86_64-apple-darwin, os: macos-latest, }
- { target: x86_64-apple-ios, os: macos-latest, }
- { target: aarch64-apple-ios, os: macos-latest, }
# We're using Windows rather than Ubuntu to run the wasm tests because caching cargo-web
# doesn't currently work on Linux.
- { target: wasm32-unknown-unknown, os: windows-latest, }
- { name: 'Windows 64bit MSVC', target: x86_64-pc-windows-msvc, os: windows-latest, }
- { name: 'Windows 32bit MSVC', target: i686-pc-windows-msvc, os: windows-latest, }
- { name: 'Windows 64bit GNU', target: x86_64-pc-windows-gnu, os: windows-latest, host: -x86_64-pc-windows-gnu }
- { name: 'Windows 32bit GNU', target: i686-pc-windows-gnu, os: windows-latest, host: -i686-pc-windows-gnu }
- { name: 'Linux 32bit', target: i686-unknown-linux-gnu, os: ubuntu-latest, }
- { name: 'Linux 64bit', target: x86_64-unknown-linux-gnu, os: ubuntu-latest, }
- { name: 'X11', target: x86_64-unknown-linux-gnu, os: ubuntu-latest, options: '--no-default-features --features=x11' }
- { name: 'Wayland', target: x86_64-unknown-linux-gnu, os: ubuntu-latest, options: '--no-default-features --features=wayland,wayland-dlopen' }
- { name: 'Android', target: aarch64-linux-android, os: ubuntu-latest, options: '--package=winit --features=android-native-activity', cmd: 'apk --' }
- { name: 'Redox OS', target: x86_64-unknown-redox, os: ubuntu-latest, }
- { name: 'macOS', target: x86_64-apple-darwin, os: macos-latest, }
- { name: 'iOS x86_64', target: x86_64-apple-ios, os: macos-latest, }
- { name: 'iOS Aarch64', target: aarch64-apple-ios, os: macos-latest, }
- { name: 'web', target: wasm32-unknown-unknown, os: ubuntu-latest, }
exclude:
# Android is tested on stable-3
- toolchain: '1.65.0'
platform: { name: 'Android', target: aarch64-linux-android, os: ubuntu-latest, options: '--package=winit --features=android-native-activity', cmd: 'apk --' }
include:
- toolchain: '1.69.0'
platform: { name: 'Android', target: aarch64-linux-android, os: ubuntu-latest, options: '--package=winit --features=android-native-activity', cmd: 'apk --' }

env:
# Set more verbose terminal output
CARGO_TERM_VERBOSE: true
RUST_BACKTRACE: 1
CARGO_INCREMENTAL: 0
RUSTFLAGS: "-C debuginfo=0 --deny warnings"
OPTIONS: ${{ matrix.platform.options }}
FEATURES: ${{ format(',{0}', matrix.platform.features ) }}

# Faster compilation and error on warnings
RUSTFLAGS: '--codegen=debuginfo=0 --deny=warnings'
RUSTDOCFLAGS: '--deny=warnings'

OPTIONS: --target=${{ matrix.platform.target }} ${{ matrix.platform.options }}
CMD: ${{ matrix.platform.cmd }}
RUSTDOCFLAGS: -Dwarnings

runs-on: ${{ matrix.platform.os }}
steps:
- uses: actions/checkout@v3
# Used to cache cargo-web
- name: Cache cargo folder
uses: actions/cache@v1
with:
path: ~/.cargo
key: ${{ matrix.platform.target }}-cargo-${{ matrix.rust_version }}

- uses: hecrj/setup-rust-action@v1
- name: Restore cache of cargo folder
# We use `restore` and later `save`, so that we can create the key after
# the cache has been downloaded.
#
# This could be avoided if we added Cargo.lock to the repository.
uses: actions/cache/restore@v3
with:
rust-version: ${{ matrix.rust_version }}${{ matrix.platform.host }}
targets: ${{ matrix.platform.target }}
components: clippy
# https://doc.rust-lang.org/cargo/guide/cargo-home.html#caching-the-cargo-home-in-ci
path: |
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
key: cargo-${{ matrix.toolchain }}-${{ matrix.platform.name }}-never-intended-to-be-found
restore-keys: cargo-${{ matrix.toolchain }}-${{ matrix.platform.name }}

- name: Generate lockfile
# Also updates the crates.io index
run: cargo generate-lockfile

- name: Install GCC Multilib
if: (matrix.platform.os == 'ubuntu-latest') && contains(matrix.platform.target, 'i686')
run: sudo apt-get update && sudo apt-get install gcc-multilib
- name: Install cargo-apk

- name: Cache cargo-apk
if: contains(matrix.platform.target, 'android')
run: cargo install cargo-apk
id: cargo-apk-cache
uses: actions/cache@v3
with:
path: ~/.cargo/bin/cargo-apk
# Change this key if we update the required cargo-apk version
key: cargo-apk-v0-9-7

- uses: dtolnay/rust-toolchain@master
if: contains(matrix.platform.target, 'android') && (steps.cargo-apk-cache.outputs.cache-hit != 'true')
with:
toolchain: stable

- name: Install cargo-apk
if: contains(matrix.platform.target, 'android') && (steps.cargo-apk-cache.outputs.cache-hit != 'true')
run: cargo install cargo-apk --version=^0.9.7 --locked

- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.toolchain }}${{ matrix.platform.host }}
targets: ${{ matrix.platform.target }}
components: clippy

- name: Check documentation
shell: bash
run: cargo doc --no-deps --target ${{ matrix.platform.target }} $OPTIONS --features $FEATURES --document-private-items
run: cargo doc --no-deps $OPTIONS --document-private-items

- name: Build crate
shell: bash
run: cargo $CMD build --verbose --target ${{ matrix.platform.target }} $OPTIONS --features $FEATURES
run: cargo $CMD build $OPTIONS

- name: Build tests
shell: bash
if: >
!contains(matrix.platform.target, 'redox') &&
matrix.rust_version != '1.65.0'
run: cargo $CMD test --no-run --verbose --target ${{ matrix.platform.target }} $OPTIONS --features $FEATURES
matrix.toolchain != '1.65.0'
run: cargo $CMD test --no-run $OPTIONS

- name: Run tests
shell: bash
if: >
!contains(matrix.platform.target, 'android') &&
!contains(matrix.platform.target, 'ios') &&
!contains(matrix.platform.target, 'wasm32') &&
!contains(matrix.platform.target, 'redox') &&
matrix.rust_version != '1.65.0'
run: cargo $CMD test --verbose --target ${{ matrix.platform.target }} $OPTIONS --features $FEATURES
matrix.toolchain != '1.65.0'
run: cargo $CMD test $OPTIONS

- name: Lint with clippy
shell: bash
if: (matrix.rust_version == 'stable') && !contains(matrix.platform.options, '--no-default-features')
run: cargo clippy --all-targets --target ${{ matrix.platform.target }} $OPTIONS --features $FEATURES -- -Dwarnings
if: (matrix.toolchain == 'stable') && !contains(matrix.platform.options, '--no-default-features')
run: cargo clippy --all-targets $OPTIONS -- -Dwarnings

- name: Build tests with serde enabled
shell: bash
if: >
!contains(matrix.platform.target, 'redox') &&
matrix.rust_version != '1.65.0'
run: cargo $CMD test --no-run --verbose --target ${{ matrix.platform.target }} $OPTIONS --features serde,$FEATURES
matrix.toolchain != '1.65.0'
run: cargo $CMD test --no-run $OPTIONS --features serde

- name: Run tests with serde enabled
shell: bash
if: >
!contains(matrix.platform.target, 'android') &&
!contains(matrix.platform.target, 'ios') &&
!contains(matrix.platform.target, 'wasm32') &&
!contains(matrix.platform.target, 'redox') &&
matrix.rust_version != '1.65.0'
run: cargo $CMD test --verbose --target ${{ matrix.platform.target }} $OPTIONS --features serde,$FEATURES
matrix.toolchain != '1.65.0'
run: cargo $CMD test $OPTIONS --features serde

# See restore step above
- name: Save cache of cargo folder
uses: actions/cache/save@v3
with:
path: |
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
key: cargo-${{ matrix.toolchain }}-${{ matrix.platform.name }}-${{ hashFiles('Cargo.lock') }}

cargo-deny:
name: Run cargo-deny on ${{ matrix.platform.name }}
runs-on: ubuntu-latest

# TODO: remove this matrix when https://github.com/EmbarkStudios/cargo-deny/issues/324 is resolved
strategy:
fail-fast: false
matrix:
platform:
- { name: 'Android', target: aarch64-linux-android }
- { name: 'iOS', target: aarch64-apple-ios }
- { name: 'Linux', target: x86_64-unknown-linux-gnu }
- { name: 'macOS', target: x86_64-apple-darwin }
- { name: 'Redox OS', target: x86_64-unknown-redox }
- { name: 'web', target: wasm32-unknown-unknown }
- { name: 'Windows', target: x86_64-pc-windows-gnu }

steps:
- uses: actions/checkout@v3
- uses: EmbarkStudios/cargo-deny-action@v1
with:
command: check
log-level: error
arguments: --all-features --target ${{ matrix.platform.target }}
Loading