bevy/crates
François c16d0c5a39 do not set cursor grab on window creation if not asked for (#3617)
# Objective

- On Safari mobile, calling `winit_window.set_cursor_grab(true)` fails as the API is not implemented (as there is no cursor on Safari mobile, the api doesn't make sense there). I don't know about other mobile browsers
```
[Error] Unhandled Promise Rejection: TypeError: getObject(arg0).exitPointerLock is not a function. (In 'getObject(arg0).exitPointerLock()', 'getObject(arg0).exitPointerLock' is undefined)
    (anonymous function) (rect.js:1089)
    wasm-stub
    <?>.wasm-function[web_sys::features::gen_Document::Document::exit_pointer_lock::h20ffc49be163fc45]
    <?>.wasm-function[winit::platform_impl::platform::backend::canvas::Canvas::set_cursor_grab::h6a9472cf55263e98]
    <?>.wasm-function[bevy_winit::winit_windows::WinitWindows::create_window::h9db5b3cbb24347c5]
    <?>.wasm-function[<bevy_winit::WinitPlugin as bevy_app::plugin::Plugin>::build::ha4a7c046b80c4280]
    <?>.wasm-function[bevy_app::plugin_group::PluginGroupBuilder::finish::h0e5bc78f71c37b2f]
    <?>.wasm-function[rect::main::h899852fd17f2d489]
    <?>.wasm-function[std::sys_common::backtrace::__rust_begin_short_backtrace::hfe38f282e8dda96b]
    <?>.wasm-function[std::rt::lang_start::{{closure}}::hc2f3b555ffc58618]
    <?>.wasm-function[std::rt::lang_start_internal::ha901ae30d88554f2]
    <?>.wasm-function[main]
    <?>.wasm-function[]
    wasm-stub
    21261
    (anonymous function) (rect.js:1664)
    asyncFunctionResume
    (anonymous function)
    promiseReactionJobWithoutPromise
    promiseReactionJob
```

## Solution

- Do not call the api to release cursor grab on window creation, as the cursor is not grabbed anyway at this point
2022-01-15 20:29:58 +00:00
..
bevy_app Document sub apps (#3403) 2022-01-14 23:14:42 +00:00
bevy_asset Enable the doc_markdown clippy lint (#3457) 2022-01-09 23:20:13 +00:00
bevy_audio Release 0.6.0 (#3587) 2022-01-08 10:18:22 +00:00
bevy_core Release 0.6.0 (#3587) 2022-01-08 10:18:22 +00:00
bevy_core_pipeline Add headless mode (#3439) 2022-01-08 10:39:43 +00:00
bevy_crevice bevy_crevice: Fix incorrect iterator usage in WriteStd430 impl for [T] (#3591) 2022-01-15 20:10:33 +00:00
bevy_derive Release 0.6.0 (#3587) 2022-01-08 10:18:22 +00:00
bevy_diagnostic Release 0.6.0 (#3587) 2022-01-08 10:18:22 +00:00
bevy_dylib Release 0.6.0 (#3587) 2022-01-08 10:18:22 +00:00
bevy_dynamic_plugin Release 0.6.0 (#3587) 2022-01-08 10:18:22 +00:00
bevy_ecs Ignore clippy 1.58 (#3667) 2022-01-14 18:21:22 +00:00
bevy_ecs_compile_fail_tests Release 0.6.0 (#3587) 2022-01-08 10:18:22 +00:00
bevy_gilrs Release 0.6.0 (#3587) 2022-01-08 10:18:22 +00:00
bevy_gltf Release 0.6.0 (#3587) 2022-01-08 10:18:22 +00:00
bevy_input Release 0.6.0 (#3587) 2022-01-08 10:18:22 +00:00
bevy_internal Enable the doc_markdown clippy lint (#3457) 2022-01-09 23:20:13 +00:00
bevy_log Release 0.6.0 (#3587) 2022-01-08 10:18:22 +00:00
bevy_macro_utils Release 0.6.0 (#3587) 2022-01-08 10:18:22 +00:00
bevy_math Release 0.6.0 (#3587) 2022-01-08 10:18:22 +00:00
bevy_pbr Add headless mode (#3439) 2022-01-08 10:39:43 +00:00
bevy_reflect document more of bevy_reflect (#3655) 2022-01-14 19:09:44 +00:00
bevy_render Use use instead of lots of full paths (#3564) 2022-01-11 01:08:39 +00:00
bevy_scene Release 0.6.0 (#3587) 2022-01-08 10:18:22 +00:00
bevy_sprite Add headless mode (#3439) 2022-01-08 10:39:43 +00:00
bevy_tasks Release 0.6.0 (#3587) 2022-01-08 10:18:22 +00:00
bevy_text Add headless mode (#3439) 2022-01-08 10:39:43 +00:00
bevy_transform Added docs for bevy_transform (#3516) 2022-01-14 18:47:48 +00:00
bevy_ui Ignore clippy 1.58 (#3667) 2022-01-14 18:21:22 +00:00
bevy_utils Release 0.6.0 (#3587) 2022-01-08 10:18:22 +00:00
bevy_window Enable the doc_markdown clippy lint (#3457) 2022-01-09 23:20:13 +00:00
bevy_winit do not set cursor grab on window creation if not asked for (#3617) 2022-01-15 20:29:58 +00:00