* X11: Fix window creation hangs when another application is fullscreen
Previously, the X11 backend would block until a `VisibilityNotify` event
is received when creating a Window that is visible or when calling
`set_visible(true)` on a Window that is not currently visible. This
could cause winit to hang in situations where the WM does not quickly
send this event to the application, such as another window being
fullscreen at the time.
This behavior existed to prevent an X protocol error caused by setting
fullscreen state on an invisible window. This fix instead stores desired
fullscreen state when `set_fullscreen` is called (iff the window is not
visible or not yet visible) and issues X commands to set fullscreen
state when a `VisibilityNotify` event is received through the normal
processing of events in the event loop.
* Add window_debug example to facilitate testing
* Add a CHANGELOG entry
* Call `XUnmapWindow` if `VisibilityNotify` is received on an invisible window
* Prevent EventLoop from getting initialized outside the main thread
This only applies to the cross-platform functions. We expose functions
to do this in a platform-specific manner, when available.
* Add CHANGELOG entry
* Formatting has changed since the latest stable update...
* Fix error spacing
* Unix: Prevent initializing EventLoop outside main thread
* Updates libc dependency to 0.2.64, as required by BSD platforms
* Update CHANGELOG.md for Linux implementation
* Finish sentence
* Consolidate documentation
* Fix so the compiler can infer msg_send! return type
Currently, due to a quirk in Rust's type inference interacting with the
structure of the msg_send! macro, a () return type will be inferred when
the compiler cannot otherwise determine the return type. This behavior
is expected to change, and in the future could resolve to a ! return
type, which results in undefined behavior.
Linting has previously been added for this in rust-lang/rust#39216, but
it did not catch these cases due to SSheldon/rust-objc#62. An upcoming
version of objc will be fixed to stop hiding these errors, at which
point they will become compile errors.
This change fixes these errors and allows winit to compile with the
fixed version of objc.
* Bump cocoa to 0.19.1
* Add web targets to travis
* Fix some bash syntax
* Avoid crash on providing no features
* Fix syntax error
* Syntax?
* Fix pleas
* Fix features check
* Add a comment
* Add nightly builds
Adds fullscreen using native web APIs to the stdweb and web-sys backends.
Due to limitations of browser APIs, requests for fullscreen can only be fulfilled during a short-lived user-triggered event. This commit does automatically handle that under the hood, but it does introduce unavoidable latency in full-screening the canvas.
* Expose HINSTANCE now using a getter function
* Missing changes
* remove unused import
* Required changes for the PR
* Rust fmt
* Use GetWindowLong
* Use GetWindowLong
* [#1111] Use consistent return types for available_monitors()
Always use `impl Iterator<Item = MonitorHandle>` instead of
`AvailableMonitorsIter`. Fix an example that used the Debug
implementation of `AvailableMonitorsIter`.
* [#1111] Update changelog
* [#1111] Remove AvailableMonitorsIter type completely
* [#1111] Remove doc references to AvailableMonitorsIter
* Fixed relative_pointer not being set up when the "zwp_relative_pointer_manager_v1" callback comes after the "wl_seat" callback
* Ran cargo fmt
* Updated changelog
* Added wayland support for set_grab_cursor and set_cursor_visible
* Updated changelog
* Ran cargo fmt
* Fixed set_cursor_visible and set_cursor_grab so they can be called from any thread.
* Ran cargo_fmt
* Improved CHANGELOG
* Added workaround so that when cursor is hidden it takes effect before the cursor enters the surface. Making the cursor visible again still only happens once the cursor re-enters the surface
* Switched to using Rc<RefCell> instead of Arc<Mutex> since all accesses to the relative_pointer_manager_proxy will happen on the same thread.
* Forgot to run cargo fmt
* Switched to using Rc and RefCell instead of Arc and Mutex where applicable.
* Improved comments and documentation relating to changing a hidden cursor back to visible on wayland.
* Wayland: Fixed cursor not appearing immendiately when setting the cursor to visible.
* Forgot to run cargo fmt
* Switched to only storing the pointers in CursorManager as AutoPointer.
* Fixed typo and removed println
* Update CHANGELOG.md
Co-Authored-By: Kirill Chibisov <wchibisovkirill@gmail.com>