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

Add support for raw-window-handle to the web branch #1192

Merged
merged 75 commits into from
Oct 2, 2019

Conversation

ryanisaacg
Copy link
Contributor

Also merges the latest master to web

  • Tested on all platforms changed
  • Compilation warnings were addressed
  • cargo fmt has been run on this branch
  • Updated documentation to reflect any user-facing changes, including notes of platform-specific behavior
  • Updated feature matrix, if new features were added or implemented

Kalmar Robert and others added 30 commits July 8, 2019 10:12
Handle WM_POINTER* events in favor of WM_TOUCH
Before starting the event loop, invoke callback with
NewEvents(StartCause::Init).
It seems we were already implementing multitouch on Windows, and the question mark was inaccurate.
…1027)

* Replace `std::mem::uninitialized` with `MaybeUninit`

* Avoid undefined behavior when using `MaybeUninit`

* Restore unused `PointerState` fields as internally public

* Zero-initialize some struct values in Xlib FFI calls

* Reform usage of `MaybeUninit` in Xlib FFI

* Prefer safe zero-initialization using `Default`, when possible
* Zero-initialize integers and floats using `0` or `0.0`
* Use `MaybeUninit::uninit` for large byte buffers and union types
* Use `MaybeUninit::uninit` when the resulting value is ignored
* Minor doc changes

* More typos
… Windows (rust-windowing#1042)

* Touch events emit screen coordinates instead of client coordinates on Windows

Fixes rust-windowing#1002

* Don't lose precision of WM_TOUCH events when converting from screen space to client space

* Updated CHANGELOG.md to reflect changes from issue: rust-windowing#1042
* X11: Fix events not being reported promptly

* Add an entry to the changelog
* Use himetric location for WM_POINTER events

* Ran rustfmt
* add macos with_disallow_hidpi

add CHANGELOG

* Always use stable rustfmt for CI. (rust-windowing#1074)

Signed-off-by: Hal Gentz <[email protected]>

* add macos with_disallow_hidpi

add CHANGELOG
…t-windowing#1065)

* Process WM_SYSCOMMAND to forbid screen savers in fullscreen mode

Fixes rust-windowing#1047

* Update CHANGELOG.md and documentation to reflect changes from issue rust-windowing#1065

* Updated documentation of window.Window.set_fullscreen to match the documentation of window.WindowBuilder.with_fullscreen.
* Add exclusive fullscreen mode

* Add `WindowExtMacOS::set_fullscreen_presentation_options`

* Capture display for exclusive fullscreen on macOS

* Fix applying video mode on macOS after a fullscreen cycle

* Fix compilation on iOS

* Set monitor appropriately for fullscreen on macOS

* Fix exclusive to borderless fullscreen transitions on macOS

* Fix borderless to exclusive fullscreen transition on macOS

* Sort video modes on Windows

* Fix fullscreen issues on Windows

* Fix video mode changes during exclusive fullscreen on Windows

* Add video mode sorting for macOS and iOS

* Fix monitor `ns_screen` returning `None` after video mode change

* Fix "multithreaded" example on macOS

* Restore video mode upon closing an exclusive fullscreen window

* Fix "multithreaded" example closing multiple windows at once

* Fix compilation on Linux

* Update FEATURES.md

* Don't care about logical monitor groups on X11

* Add exclusive fullscreen for X11

* Update FEATURES.md

* Fix transitions between exclusive and borderless fullscreen on X11

* Update CHANGELOG.md

* Document that Wayland doesn't support exclusive fullscreen

* Replace core-graphics display mode bindings on macOS

* Use `panic!()` instead of `unreachable!()` in "fullscreen" example

* Fix fullscreen "always on top" flag on Windows

* Track current monitor for fullscreen in "multithreaded" example

* Fix exclusive fullscreen sometimes not positioning window properly

* Format

* More formatting and fix CI issues

* Fix formatting

* Fix changelog formatting
…deo mode (rust-windowing#1078)

* iOS: platform specific edge home indicator control

* iOS: exclusive video mode support

* address nits, and linkify all the ios documentation
…ing#1086)

* Do not require `T: Clone` for `EventLoopProxy<T>: Clone`

* Update `CHANGELOG.md`

* Remove the conflicting `Clone` impl

* Fix match statement
* Add new `EventLoopWindowTargetExtUnix` trait.

Signed-off-by: Hal Gentz <[email protected]>

* Slide.

Signed-off-by: Hal Gentz <[email protected]>

* Travis, damn you.

Signed-off-by: Hal Gentz <[email protected]>

* Update CHANGELOG.md
)

* macOS/iOS: Fix auto trait impls of `EventLoopProxy`

`EventLoopProxy<T>` allows sending `T` from an arbitrary thread that
owns the proxy object. Thus, if `T` is `!Send`, `EventLoopProxy<T>` must
not be allowed to leave the main thread.

`EventLoopProxy<T>` uses `std::sync::mpsc::Sender` under the hood,
meaning the `!Sync` restriction of it also applies to
`EventLoopProxy<T>`. That is, even if `T` is thread-safe, a single
`EventLoopProxy` object cannot be shared between threads.

* Update `CHANGELOG.md`
ayazhafiz and others added 20 commits September 12, 2019 16:38
On macOS, there is a difference between a "grab" cursor and a "grabbing"
cursor, where "grab" is an open-hand cursor used during a hover, and
"grabbing" is a closed-hand cursor used on a click. These, and other
native MacOS cursors, can be seen at the [NSCursor documentation](https://developer.apple.com/documentation/appkit/nscursor?language=objc).

See iced-rs/iced#9 for the motivation for this
PR.
* Fix surrogate pair handling on Windows

* Change high_surrogate to Option<u16>

* Format
…#1166)

* Flush high surrogate if not followed by low surrogate

* Remove transmute from WM_CHAR handler

* Fix window_state being locked while dispatching ReceivedCharacter for surrogate codepoints.

* Format
…ream of CursorMoved events (rust-windowing#1170)

* Fix hovering the mouse over the active window creating an endless stream of CursorMoved events

* Format
…t-windowing#1147)

* Allow using multiple `XWindowType`s on X11 (rust-windowing#1140)

* Update documentation to make combining window types clearer

* Update build flags because X11 runs on more than just Linux

* Revert "Update build flags because X11 runs on more than just Linux"

This reverts commit 882b910.

* Revert "Update documentation to make combining window types clearer"

This reverts commit da00ad3.

* Revert "Allow using multiple `XWindowType`s on X11 (rust-windowing#1140)"

This reverts commit a230333.

* Allow using multiple `XWindowType`s on X11 (slice variant) (rust-windowing#1140)

* Multiple `XWindowType`s, with non-static lifetime.

* Multiple `XWindowType`s (rust-windowing#1140) (`Vec` variant)

* Append change to changelog.

* Fix formatting.
* X11: Fix panic when no monitors are available

* Set dummy monitor's dimensions to `(1, 1)`

* X11: Avoid panicking when there are no monitors in Window::new
…oxy when creating SeatData (rust-windowing#1179)

* 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

* Improved CHANGELOG

* 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
@ryanisaacg
Copy link
Contributor Author

A note: it appears that merging master back into web (to get the raw-window-handle support) has greatly complicated the git history of this PR. I'm not sure what to do about that?

@ryanisaacg ryanisaacg mentioned this pull request Sep 27, 2019
10 tasks
@goddessfreya
Copy link
Contributor

An quick skim doesn't reveal anything off, lgtm, altho I haven't tested anything.

When merging this, please manually merge it via the console, instead of the big green squash and merge button :P

@ryanisaacg ryanisaacg merged commit 02f2815 into rust-windowing:web Oct 2, 2019
@ryanisaacg ryanisaacg deleted the merge-master-to-web branch October 2, 2019 18:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.