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

Backport changes from master to eventloop-2.0 #833

Merged
merged 13 commits into from
Apr 8, 2019

Conversation

elinorbgr
Copy link
Contributor

This backports the changes that occured to master into the eventloop-2.0 branch to avoid the two branches from diverging too much.

Given eventloop-2.0 is basically unrebasable, I cherry-picked the changes from master into it. Conflics were pretty trivial to fix once I have removed leftover files in eventloop-2.0 (see the first commit of this PR).

@elinorbgr elinorbgr requested a review from Osspial April 7, 2019 14:15
trimental and others added 12 commits April 7, 2019 16:39
* add handler for horizontal wheel input

* add changlelog message re now handling horiz scroll on windows
…dowing#755)

* Fix incorrect keycodes when using a non-US keyboard layout.

This commit fixes the issue described in rust-windowing#752, and uses the advised
method to fix it.

* Style fixes

Co-Authored-By: Toqozz <[email protected]>

* Refactoring of macOS `virtualkeycode` fix (rust-windowing#752)

* Applies requested changes as per pull request discussion (rust-windowing#755).
XNextEvent will block for input while holding the global Xlib mutex.

This will cause a deadlock in even the most trivial multi-threaded
application because OpenGL functions will need to hold the Xlib mutex
too.

Add EventsLoop::poll_one_event and EventsLoop::wait_for_input to provide
thread-safe functions to poll and wait events from the X11 event queue
using unix select(2) and XCheckIfEvent.

This is a somewhat ugly workaround to an ugly problem.

Fixes rust-windowing#779
* When building ModifiersState, ignore AltGr on Windows

* Add CHANGELOG entry

* Also filter out Control when pressing AltGr
* Use `XRRGetScreenResourcesCurrent` when avail.

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

* Changelog

Signed-off-by: Hal Gentz <[email protected]>
* Update winit to 0.19.0

* Update date for 0.19
…ng#819)

* On Windows, fix CursorMoved(0, 0) getting sent on focus

* Add changelog entry
* Fix build on FreeBSD

error[E0432]: unresolved import `libc::__errno_location`
  --> src/platform/linux/x11/mod.rs:22:85
   |
22 | use libc::{select, fd_set, FD_SET, FD_ZERO, FD_ISSET, EINTR, EINVAL, ENOMEM, EBADF, __errno_location};
   |                                                                                     ^^^^^^^^^^^^^^^^ no `__errno_location` in the root

__errno_location is called __error on FreeBSD and __errno on Open- and NetBSD.

Signed-off-by: Tobias Kortkamp <[email protected]>

* Import __error / __errno on *BSD as __errno_location

Signed-off-by: Tobias Kortkamp <[email protected]>

* Add changelog entry

Signed-off-by: Tobias Kortkamp <[email protected]>
…#810)

* fix command key event left and right reverse on macOS

rust-windowing#808

* update changelog
* Add additional numpad key mappings

Since some platforms have already used the existing `Add`, `Subtract`
and `Divide` codes to map numpad keys, the X11 and Wayland platform has
been updated to achieve parity between platforms. On macOS only the
`Subtract` numpad key had to be added.

Since the numpad key is different from the normal keys, an alternative
option would be to add new `NumpadAdd`, `NumpadSubtract` and
`NumpadDivide` actions, however I think in this case it should be fine
to map them to the same virtual key code.

* Add Numpad PageUp/Down, Home and End on Wayland
Copy link
Contributor

@Osspial Osspial left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You might have to merge this manually since this repo only has squash merges enabled, but other than that these look good.

@elinorbgr
Copy link
Contributor Author

Alright, I'll just push these commits to eventloop-2.0 then.

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.

9 participants