Commit graph

2087 commits

Author SHA1 Message Date
dam4rus 454d4190b7 Use himetric values in WM_POINTER events (#1053)
* Use himetric location for WM_POINTER events

* Ran rustfmt
2019-07-26 01:12:06 -06:00
Austin Lasher a28b60578d Fix run_return example build error on non-desktop platforms (#1067) 2019-07-25 14:56:24 -04:00
Tilman Schmidt 5a206de620 macOS: Drop the closure on exit. (Fixes #1058) (#1063) 2019-07-23 14:44:06 -06:00
Simon Sapin b547531499 Update the percent-encoding crate to 2.0 (#1066) 2019-07-23 13:38:45 -04:00
Murarth 39e668ffb0 Fix CHANGELOG.md (#1061) 2019-07-22 19:26:52 -06:00
Murarth bd1ac6cb1e X11: Fix events not being reported promptly (#1048)
* X11: Fix events not being reported promptly

* Add an entry to the changelog
2019-07-17 14:09:02 -04:00
dam4rus 8567758156 Touch events emit screen coordinates instead of client coordinates on Windows (#1042)
* Touch events emit screen coordinates instead of client coordinates on Windows

Fixes #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: #1042
2019-07-17 12:25:35 -04:00
Murarth e8e4d4ce66 X11: Fix request_redraw deadlock while handling RedrawRequested (#1046) 2019-07-16 16:53:41 -06:00
Felix Rabe 44af4f4f52 Minor doc changes (#1024)
* Minor doc changes

* More typos
2019-07-12 19:05:07 -04:00
Murarth 7daf146801 Replace std::mem::uninitialized with MaybeUninit (#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
2019-07-11 10:34:32 -06:00
Osspial 17b8310517
Update Windows Multitouch in FEATURES.md (#1039)
It seems we were already implementing multitouch on Windows, and the question mark was inaccurate.
2019-07-10 18:54:34 -04:00
Osspial 5ca828d445
Merge pull request #1031 from rikusalminen/event_loop_test
Add NewEvents(Init) callback to x11
2019-07-10 11:29:21 -04:00
Riku Salminen 1ea29b4de0 x11: NewEvents(StartCause::Init) callback at start
Before starting the event loop, invoke callback with
NewEvents(StartCause::Init).
2019-07-10 15:27:57 +03:00
Osspial b00cdadb5b
Merge pull request #991 from dam4rus/master
Handle WM_POINTER* events in favor of WM_TOUCH
2019-07-10 02:30:09 -04:00
Osspial 5d0bc5f607
Correct 0.20.0 Alpha 2 release date 2019-07-09 19:19:00 -04:00
Osspial ce5cf97e17
Release Alpha 2 (#996) 2019-07-09 18:25:32 -04:00
Felix Rabe 3ee59696e5 Always use f as the argument name for &mut std::fmt::Formatter (#1023) 2019-07-09 17:49:07 -04:00
aloucks f5c624bcd6 Handle RedrawRequested event in request_redraw example (#1030) 2019-07-08 22:22:10 -06:00
Kalmár Róbert 026b331ba5 Handle WM_POINTER* events in favor of WM_TOUCH
Fixes #975
2019-07-08 10:13:02 +02:00
Kalmar Robert 93c36ccf78 Handle WM_POINTER* events in favor of WM_TOUCH
Fixes #975.
2019-07-08 10:12:47 +02:00
Felix Rabe c1f314ccdc MacOS: request_user_attention(bool -> enum) (#1021) 2019-07-07 14:14:00 -06:00
Felix Rabe 53a89f28a0 Remove dead code (unused as of d5391686a) (#1022) 2019-07-07 14:13:17 -06:00
Felix Rabe f874d76289 Fix warnings (#1020)
* Windows: Fix warning

* iOS: Fix warning
2019-07-07 14:12:39 -06:00
Bradley Smith 28775be115 Fix transparent window with decorations (#1011)
* Fix transparent window with decorations

* To changelog, added fix for transparent decorated windows.
2019-07-06 13:29:15 -04:00
Felix Rabe 7d3ff3d2d9 Fix warning (#1016) 2019-07-06 13:28:50 -04:00
Osspial 4a5d639d74
On Windows, fix with_maximized not properly setting window size to entire window. (#1013) 2019-07-05 17:28:11 -04:00
Osspial 74a7cf55ea
Fix issues with redraw_requested when called during EventsCleared (#994)
* Fix issues with redraw_requested when called during EventsCleared

* Format

* Fix event dispatch after RedrawRequested but before EventsCleared

This could happen if the event queue was cleared, we processed WM_PAINT,
but the event queue got re-filled before we checked to see it was empty.

* Fix paint ordering issues when resizing window

* Format
2019-07-04 16:14:15 -04:00
Murarth 9393b14b01 X11: Disable maximize on non-resizable windows (#1000)
* X11: Disable maximize on non-resizable windows

* Add a note for the source for Motif WM constants
2019-07-04 04:43:44 -06:00
Aleksi Juvani f8bd671073 Remove Metal dependency on macOS (#1003) 2019-07-03 14:19:07 -04:00
Murarth 2af753f307 Fix warnings on Linux (#1004) 2019-07-03 14:18:42 -04:00
Michael Streif 5bf303fd26 Improve handling of file paths in the windows DnD handler (#980)
* Make FileDropHandler::iterate_filenames more robust

by replacing the call to mem::uninitialized with mem::zeroed and change
file name retrieval to use buffers of exact length as reported
by DragQueryFileW instead of relying on MAX_PATH.

* Change remaining calls of uninitialized to zeroed

* Run rustfmt

* Add CHANGELOG entry and comment
2019-06-28 18:07:36 -04:00
Felix Rabe e37e46b155 Remove comment that contradicts code (#992) 2019-06-28 15:32:27 -04:00
Victor Berger b8192ef6f6 Revert "wayland: use an invisible surface as shell surface (#835)" (#981)
This reverts commit 65587ef43a.

It introduced sublte bugs in its interaction with OpenGL and glutin,
so we should better revert it for now.
2019-06-28 15:31:54 -04:00
Ho-Yon Mak 23354cf1a5 Implement _NET_WM_PING for X11 (#977) 2019-06-27 18:40:27 -06:00
Felix Rabe dd38fab2f3 examples/window_icon.rs: De-duplicate code (#988) 2019-06-27 11:59:13 -04:00
Tristam MacDonald ac08601b40 Implement DeviceEvent::Button on Mac (#967)
* Add deviceevent logging to cursor_grab example

* Implement DeviceEvent::Button on Mac
2019-06-27 02:58:21 -04:00
Austin Lasher 34db2d7d4c Fix broken links to mod DPI on various documentation pages (#984) 2019-06-26 15:35:54 +02:00
chichid 0e20973bdb Fix 968: Invisible windows steal focus from visible windows Win32 (#968) 2019-06-26 00:04:49 -04:00
Murarth 29e2481597 Remove XFlush call in event loop (#982)
Internally, `XFlush` calls `_XSend` to write data. It then calls
`XEventsQueued(display, QueuedAfterReading)`, which reads data from the
X server connection. This prevents the event loop source callback from
being run, as there is no longer data waiting on the socket.

Ideally, we would want to call `_XSend` directly to ensure that no
output is buffered by Xlib. However, this function is not exported as
part of Xlib's public API.

Testing with the `XFlush` call removed does not appear to adversely
affect the performance of an application. If any bugs should eventually
arise from this change, perhaps another function may be used in place of
`XFlush`, such as `XPending`, which writes buffered output but does not
so aggressively read from the X server connection.

Closes #865
2019-06-25 15:29:52 -06:00
Cherser-s 3555de114a Wayland: Add relative pointer movement (#973)
* Add relative pointer movement for Wayland

* Format changed code with rustfmt

* Wayland: merge window and device event queues into one

* Replace map_or_else call for simplification
2019-06-25 03:00:41 -06:00
Austin Lasher dbe6a1bcdf Update docs to differentiate DeviceEvents and WindowEvents (#976) 2019-06-24 17:30:06 -04:00
Osspial a195ce8146
Re-format on stable rustfmt (#974) 2019-06-24 12:14:55 -04:00
Felix Rabe 9dd15d00d8 Update PULL_REQUEST_TEMPLATE.md (#969) 2019-06-23 14:05:37 -04:00
Felix Rabe 2442305bb7 Forward porting (#966)
* README: Use shields.io instead of Herokuapp (#859)

* README: Link to FEATURES.md and missing features wiki page (#860)

Closes #854

* Update URLs (#863)

* CHANGELOG.md: Add line from #861 (legacy) that is missing from equivalent #964 (EL 2)
2019-06-23 02:39:26 -04:00
Felix Rabe 063648368d CHANGELOG.md: Move entries for #805 to 0.19.1 (#965) 2019-06-22 13:57:56 -04:00
Osspial 918b2efce7
Improve the example in lib.rs (#957) 2019-06-22 13:26:06 -04:00
Abendstolz 2467a997f4 [#963] Change XRandR display size check to also take height into account (#964) 2019-06-22 18:48:51 +02:00
Felix Rabe f457c6a0b8 Change Suspended(true/false) => Suspended/Resumed (#959) 2019-06-21 20:59:31 -06:00
Felix Rabe 1193cada46 Minor spelling changes (#960) 2019-06-21 18:34:55 -06:00
Felix Rabe b0e09b8ffe Rephrase (#958) 2019-06-21 17:35:08 -06:00