winit-sonoma-fix/examples
Pedro Côrte-Real 59c33d2c6a Move fullscreen modes to not touch physical resolutions (#270)
* Fix X11 screen resolution change using XrandR

The previous XF86 resolution switching was broken and everything
seems to have moved on to xrandr. Use that instead while cleaning
up the code a bit as well.

* Use XRandR for actual multiscreen support in X11

* Use actual monitor names in X11

* Get rid of ptr::read usage in X11

* Use a bog standard Vec instead of VecDeque

* Get rid of the XRandR mode switching stuff

Wayland has made the decision that apps shouldn't change screen
resolutions and just take the screens as they've been setup. In the
modern world where GPU scaling is cheap and LCD panels are scaling
anyway it makes no sense to make "physical" resolution changes when
software should be taking care of it. This massively simplifies the
code and makes it easier to extend to more niche setups like MST and
videowalls.

* Rename fullscreen options to match new semantics

* Implement XRandR 1.5 support

* Get rid of the FullScreen enum

Moving to just having two states None and Some(MonitorId) and then
being able to set full screen in the current monitor with something
like:

window.set_fullscreen(Some(window.current_monitor()));

* Implement Window::get_current_monitor()

Do it by iterating over the available monitors and finding which
has the biggest overlap with the window. For this MonitorId needs
a new get_position() that needs to be implemented for all platforms.

* Add unimplemented get_position() to all MonitorId

* Make get_current_monitor() platform specific

* Add unimplemented get_current_monitor() to all

* Implement proper primary monitor selection in X11

* Shut up some warnings

* Remove libxxf86vm package from travis

Since we're no longer using XF86 there's no need to keep the package
around for CI.

* Don't use new struct syntax

* Fix indentation

* Adjust Android/iOS fullscreen/maximized

On Android and iOS we can assume single screen apps that are already
fullscreen and maximized so there are a few methods that are implemented
by just returning a fixed value or not doing anything.

* Mark OSX/Win fullscreen/maximized unimplemented()!

These would be safe as no-ops but we should make it explicit so
there is more of an incentive to actually implement them.
2017-09-07 10:33:46 +02:00
..
cursor.rs wayland: add a warning in the examples in case no window is displayed. 2017-07-19 18:53:49 +02:00
fullscreen.rs Move fullscreen modes to not touch physical resolutions (#270) 2017-09-07 10:33:46 +02:00
grabbing.rs wayland: add a warning in the examples in case no window is displayed. 2017-07-19 18:53:49 +02:00
min_max_size.rs wayland: add a warning in the examples in case no window is displayed. 2017-07-19 18:53:49 +02:00
multiwindow.rs wayland: add a warning in the examples in case no window is displayed. 2017-07-19 18:53:49 +02:00
proxy.rs wayland: add a warning in the examples in case no window is displayed. 2017-07-19 18:53:49 +02:00
transparent.rs wayland: add a warning in the examples in case no window is displayed. 2017-07-19 18:53:49 +02:00
window.rs wayland: add a warning in the examples in case no window is displayed. 2017-07-19 18:53:49 +02:00