* Add initial draft of SCOPE document
* Rephrase/rename feature tiers
* Rename to FEATURES and add a few annotations
* Fix API Reworks table
* Add more annotations
* Some phrasing
* Split compat matrix into seperate section, to be moved into wiki
* Mention compatibility in CONTRIBUTING
* Remove some discuss annotations
* Apply review changes and rename child windows feature to popup windows
* Update based on discussion
* Add issue for Android HiDPI
* Update FEATURES.md
* Update FEATURES.md
* Update PULL_REQUEST_TEMPLATE.md
* Update PULL_REQUEST_TEMPLATE.md
* Reformat FEATURES.MD
* Remove comments
* Improve formatting and add guide for extending #Features
* Prevent the event loop from pausing after entering modal loop
After clicking the window title bar or border (for a drag or resize),
the event loop pauses until the mouse is moved. This change relays
the WM_NCLBUTTONDOWN message to the dummy window where it queues
a redraw and consumes the message. This effectively jumpstarts
the modal loop and it continues to fire draw requests.
* Handle WM_NCLBUTTONDOWN in public_window_callback instead of relaying.
Relaying the WM_NCLBUTTONDOWN message to the modal window turned out
to be unnecessary.
* 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
* Use `XRRGetScreenResourcesCurrent` when avail.
Signed-off-by: Hal Gentz <zegentzy@protonmail.com>
* Changelog
Signed-off-by: Hal Gentz <zegentzy@protonmail.com>
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#779
* Fix incorrect keycodes when using a non-US keyboard layout.
This commit fixes the issue described in #752, and uses the advised
method to fix it.
* Style fixes
Co-Authored-By: Toqozz <toqoz@hotmail.com>
* Refactoring of macOS `virtualkeycode` fix (#752)
* Applies requested changes as per pull request discussion (#755).
* match unix common API to evl 2.0
* wayland: eventloop2.0
* make EventLoopProxy require T: 'static
* Fix linux build and tests
* wayland: update sctk & small fixes
* Rename EventsLoop and associated types to EventLoop
* Rename WindowEvent::Refresh to WindowEvent::Redraw
* Remove second thread from win32 backend
* Update run_forever to hijack thread
* Replace windows Mutex with parking_lot Mutex
* Implement new ControlFlow and associated events
* Add StartCause::Init support, timer example
* Add ability to send custom user events
* Fully invert windows control flow so win32 calls into winit's callback
* Add request_redraw
* Rename platform to platform_impl
* Rename os to platform, add Ext trait postfixes
* Add platform::desktop module with EventLoopExt::run_return
* Re-organize into module structure
* Improve documentation
* Small changes to examples
* Improve docs for run and run_return
* Change instances of "events_loop" to "event_loop"
* Rename MonitorId to MonitorHandle
* Add CHANGELOG entry
* Improve WaitUntil timer precision
* When SendEvent is called during event closure, buffer events
* Fix resize lag when waiting in some situations
* Update send test and errors that broke some examples/APIs
* Improve clarity/fix typos in docs
* Fix unreachable panic after setting ControlFlow to Poll during some RedrawRequested events.
* Fix crash when running in release mode
* Remove crossbeam dependency and make drop events work again
* Remove serde implementations from ControlFlow
* Fix 1.24.1 build
* Fix freeze when setting decorations
* Replace &EventLoop in callback with &EventLoopWindowTarget
* Document and implement Debug for EventLoopWindowTarget
* Fix some deadlocks that could occur when changing window state
* Fix thread executor not executing closure when called from non-loop thread
* Fix buffered events not getting dispatched
* Fix crash with runner refcell not getting dropped
* Address review feedback
* Fix CHANGELOG typo
* Catch panics in user callback
* Add support for generating dummy DeviceIDs and WindowIDs
* Fix linux
* Improve docs and move dummy to unsafe
* Strengthen guarantees a bit
* Add backticks to CHANGELOG.md
Co-Authored-By: Xaeroxe <xaeroxe@amethyst-engine.org>
* feat: add macos simple fullscreen
* move impl to WindowExt
* feedback: remove warning, unused file and rename param
* feedback: combine fullscreen examples into one example
* fix: ensure decorations and maximize do not toggle while in fullscreen
* fix: prevent warning on non-macos platforms
* feedback: make changelog more explicit
* fix: prevent unconditional construction of NSRect
* fix: don't try to set_simple_fullscreen if already using native fullscreen
* fix: ensure set_simple_fullscreen plays nicely with set_fullscreen
* fix: do not enter native fullscreen if simple fullscreen is active
This commit restricts an Xfwm4-specific DPI-preserving hack to Xfwm4
only. The hack saves and restores the DPI-adjusted size until the actual
size matches. On tiling WMs like i3 this fails, since the size is
constrained by the layout. This in turn causes a never-ending
XResizeWindow vs. XConfigureWindow fight between the WM and the client,
making the WM, winit client, and Xorg consume all CPU cycles available.
* Fix resize border appearing in some cases after leaving fullscreen.
* On fullscreen, save client rect instead of window rect
* Add CHANGELOG entry
* Revert test changes to fullscreen example
* Update panic message when unable to get client area
* Move the event managent to the closure
In preparation of more events not relating to the SeatManager being
captured.
* Handle wl_output remove events
In some cases, wl_outputs can be removed without the compositor
notifying the surfaces using leave/enter events. This breaks the DPI and
resize stuff since the windows' list of monitors were not updated.
Now, wl_output removals are handled and windows are updated accordingly.
* Add changelog entry for disappearing wl_outputs
* Clearer changelog message for wl_output removal changes
* Fix panic when dragging text onto a window on Windws (#697)
* Changed `panic` to `debug` (log) when unknow error occurs in `GetData` while processing a drag-drop / hover event. Plus added appropriate cursor effect if hovered item can not be processed.
* Improved code clarity.
* Add documentation to clarify behaviour of `DroppedFile`, `HoveredFile`, and `HoveredFileCancelled`
* Add period at the end of sentences in documentation.
Motivation:
This allows VirtualKeyCode variants to be stored in a BTreeSet.
Unlike HashSets, BTreeSets implement Ord and Hash, allowing them to be
keys in a {Hash|BTree}Maps. This is nice, e.g. when implementing
keyboard shortcuts functionality, which maps a set of pressed keys to
some action.