Commit graph

700 commits

Author SHA1 Message Date
Osspial
b03e589987
On Windows, Unset maximized when transforming window ()
* Unset maximized when functionally transforming window

* Add docs

* Fix compile issues
2019-08-26 22:07:15 -04:00
Murarth
0b497b62d8 X11: Improve performance of Window::set_cursor_icon ()
* X11: Fix performance issue with rapidly resetting cursor icon

* When setting cursor icon, if the new icon value is the same as the
  current value, no messages are sent the X server.

* X11: Cache cursor objects in XConnection

* Add changelog entry
2019-08-26 22:06:59 -04:00
Aleksi Juvani
dd99b3bd73 Fix inverted parameter in set_prefers_home_indicator_hidden on iOS () 2019-08-26 19:56:10 -04:00
mtak-
f53683f01f iOS os version checking around certain APIs ()
* iOS os version checking

* iOS, fix some incorrect msg_send return types

* address nits, and fix OS version check for unsupported os versions

* source for 60fps guarantee
2019-08-26 18:47:23 -04:00
Kirill Chibisov
7b707e7d75 macos: Implement run_return ()
* macos: Implement run_return

* Update comments

* Fix CHANGELOG.md
2019-08-23 02:30:53 -07:00
Osspial
31110be396
Release alpha 3 () 2019-08-14 11:09:47 -04:00
Osspial
604016d69d
Implement raw_window_handle::HasRawWindowHandle for Window type ()
* Implement raw_window_handle::HasRawWindowHandle for Window type

* Format

* Address compilation issues

* Fix Linux build hopefully

* Fix iOS build
2019-08-14 07:57:16 -04:00
mtak-
1aab328e2a macos: fix an incorrect type signature on NSView drawRect () 2019-08-14 00:01:22 -04:00
Aleksi Juvani
1366dc326a Add touch pressure information for touch events on iOS ()
* Add touch pressure information for touch events on iOS

* Add a variant for calibrated touch pressure
2019-08-13 18:12:13 -04:00
YVT
31ada5a052 macOS/iOS: Fix auto trait impls of EventLoopProxy ()
* 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`
2019-08-08 17:13:13 -07:00
Aleksi Juvani
30b4f8dc9f Replace set_decorations with set_prefers_status_bar_hidden on iOS () 2019-08-08 16:10:54 -07:00
Hal Gentz
cf0b8babbd
Add new EventLoopWindowTargetExtUnix trait. ()
* Add new `EventLoopWindowTargetExtUnix` trait.

Signed-off-by: Hal Gentz <zegentzy@protonmail.com>

* Slide.

Signed-off-by: Hal Gentz <zegentzy@protonmail.com>

* Travis, damn you.

Signed-off-by: Hal Gentz <zegentzy@protonmail.com>

* Update CHANGELOG.md
2019-08-08 14:50:22 -07:00
Aleksi Juvani
c0c22c8ff1 Disable overscan compensation for external displays on iOS () 2019-08-06 16:47:00 -04:00
YVT
73cf10e4f3 Do not require T: Clone for EventLoopProxy<T>: Clone ()
* Do not require `T: Clone` for `EventLoopProxy<T>: Clone`

* Update `CHANGELOG.md`

* Remove the conflicting `Clone` impl

* Fix match statement
2019-08-05 16:51:42 -04:00
Aleksi Juvani
1e4c176506 Fix armv7-apple-ios compile target () 2019-08-01 01:30:05 -06:00
mtak-
3c27e7d88f iOS: add support for controlling the home indicator, and Exclusive video mode ()
* iOS: platform specific edge home indicator control

* iOS: exclusive video mode support

* address nits, and linkify all the ios documentation
2019-07-31 00:57:31 -06:00
Aleksi Juvani
5bc3cf18d9 Add exclusive fullscreen mode ()
* 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
2019-07-29 14:16:14 -04:00
Brian Kabiro
131e67ddc1 Rename new_user_event method to with_user_event () ()
Finishes 
2019-07-29 08:58:16 -06:00
dam4rus
e5ba79db04 Process WM_SYSCOMMAND to forbid screen savers in fullscreen mode ()
* Process WM_SYSCOMMAND to forbid screen savers in fullscreen mode

Fixes 

* Update CHANGELOG.md and documentation to reflect changes from issue 

* Updated documentation of window.Window.set_fullscreen to match the documentation of window.WindowBuilder.with_fullscreen.
2019-07-29 03:18:23 -06:00
t嘎
f4e9bf51db add macos with_disallow_hidpi ()
* add macos with_disallow_hidpi

add CHANGELOG

* Always use stable rustfmt for CI. ()

Signed-off-by: Hal Gentz <zegentzy@protonmail.com>

* add macos with_disallow_hidpi

add CHANGELOG
2019-07-29 02:07:36 -06:00
Tilman Schmidt
5a206de620 macOS: Drop the closure on exit. (Fixes ) () 2019-07-23 14:44:06 -06:00
Murarth
39e668ffb0 Fix CHANGELOG.md () 2019-07-22 19:26:52 -06:00
Murarth
bd1ac6cb1e X11: Fix events not being reported promptly ()
* 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 ()
* Touch events emit screen coordinates instead of client coordinates on Windows

Fixes 

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

* Updated CHANGELOG.md to reflect changes from issue: 
2019-07-17 12:25:35 -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 () 2019-07-09 18:25:32 -04:00
Felix Rabe
c1f314ccdc MacOS: request_user_attention(bool -> enum) () 2019-07-07 14:14:00 -06:00
Bradley Smith
28775be115 Fix transparent window with decorations ()
* Fix transparent window with decorations

* To changelog, added fix for transparent decorated windows.
2019-07-06 13:29:15 -04:00
Osspial
4a5d639d74
On Windows, fix with_maximized not properly setting window size to entire window. () 2019-07-05 17:28:11 -04:00
Osspial
74a7cf55ea
Fix issues with redraw_requested when called during EventsCleared ()
* 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 ()
* 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 () 2019-07-03 14:19:07 -04:00
Michael Streif
5bf303fd26 Improve handling of file paths in the windows DnD handler ()
* 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
Victor Berger
b8192ef6f6 Revert "wayland: use an invisible surface as shell surface ()" ()
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 () 2019-06-27 18:40:27 -06:00
Tristam MacDonald
ac08601b40 Implement DeviceEvent::Button on Mac ()
* Add deviceevent logging to cursor_grab example

* Implement DeviceEvent::Button on Mac
2019-06-27 02:58:21 -04:00
chichid
0e20973bdb Fix 968: Invisible windows steal focus from visible windows Win32 () 2019-06-26 00:04:49 -04:00
Felix Rabe
2442305bb7 Forward porting ()
* README: Use shields.io instead of Herokuapp ()

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

Closes 

* Update URLs ()

* CHANGELOG.md: Add line from  (legacy) that is missing from equivalent  (EL 2)
2019-06-23 02:39:26 -04:00
Felix Rabe
063648368d CHANGELOG.md: Move entries for to 0.19.1 () 2019-06-22 13:57:56 -04:00
Felix Rabe
f457c6a0b8 Change Suspended(true/false) => Suspended/Resumed () 2019-06-21 20:59:31 -06:00
Osspial
8d6e8bb8d1
Release 0.20.0 Alpha 1 () 2019-06-21 11:33:44 -04:00
Osspial
b1b5aefc4b
Implement fix described in ()
* Implement fix described in 

* Add changelog entry
2019-06-20 23:59:27 -04:00
Aleksi Juvani
91f05e940f Fix initial dimensions of a fullscreen window on Windows () 2019-06-13 15:17:56 -04:00
Victor Berger
65587ef43a wayland: use an invisible surface as shell surface ()
This decorelates the window management from the actual user content,
meaning:

- the created window no longer needs the user to draw something to
  start existing
- it reduces our need to do roundtrips during initialization to
  avoid protocol errors
2019-06-13 12:50:02 -04:00
Aleksi Juvani
47b5dfa034 Support listing available video modes for a monitor ()
* Support listing available video modes for a monitor

* Use derivative for Windows `MonitorHandle`

* Update FEATURES.md

* Fix multiline if statement

* Add documentation for `VideoMode` type
2019-06-12 14:07:25 -04:00
Nikolai Vazquez
f256ff7d58 Make ns identifiers use snake_case on macOS ()
This makes the macOS API style consistent with that of iOS.
2019-06-10 19:09:38 -04:00
Osspial
0df436901a
Refine function names and type signatures ()
* First name consistency pass. More to come!

* Remove multitouch variable (hopefully this compiles!)

* Remove CreationError::NotSupported

* Add new error handling types

* Remove `get_` prefix from getters.

This is as per the Rust naming conventions recommended in
https://rust-lang-nursery.github.io/api-guidelines/naming.html#getter-names-follow-rust-convention-c-getter

* Make changes to Window position and size function signatures

* Remove CreationError in favor of OsError

* Begin updating iOS backend

* Change MonitorHandle::outer_position to just position

* Fix build on Windows and Linux

* Add Display and Error implementations to Error types

* Attempt to fix iOS build.

I can't actually check that this works since I can't cross-compile to
iOS on a Windows machine (thanks apple :/) but this should be one of
several commits to get it working.

* Attempt to fix iOS errors, and muck up Travis to make debugging easier

* More iOS fixins

* Add Debug and Display impls to OsError

* Fix Display impl

* Fix unused code warnings and travis

* Rename set_ime_spot to set_ime_position

* Add CHANGELOG entry

* Rename set_cursor to set_cursor_icon and MouseCursor to CursorIcon

* Organize Window functions into multiple, categorized impls

* Improve clarity of function ordering and docs in EventLoop
2019-05-29 21:29:54 -04:00
Osspial
2ead1c1c59 Update for 0.19.1 () 2019-04-08 08:35:36 +02:00
Hal Gentz
746e99c958 Add ability to get wayland display from events loop. ()
Signed-off-by: Hal Gentz <zegentzy@protonmail.com>
2019-04-08 08:34:49 +02:00
Osspial
47194b5f3c Fix window icon ()
* Fix window icon

* Add CHANGELOG entry
2019-04-08 08:30:37 +02:00