On Unix, add option to pick backends

Add features 'x11'  and 'wayland' to pick backends on Linux/BSD, with
both enabled by default.

Fixes #774.
This commit is contained in:
Olivier Goffart 2020-06-15 09:15:27 +02:00 committed by GitHub
parent 5a6cfc314e
commit c1ea0dde92
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 323 additions and 200 deletions

View file

@ -158,6 +158,7 @@ impl Window {
Some(Fullscreen::Borderless(RootMonitorHandle {
inner: PlatformMonitorHandle::Wayland(ref monitor_id),
})) => frame.set_fullscreen(Some(&monitor_id.proxy)),
#[cfg(feature = "x11")]
Some(Fullscreen::Borderless(_)) => unreachable!(),
None => {
if attributes.maximized {
@ -354,6 +355,7 @@ impl Window {
.unwrap()
.set_fullscreen(Some(&monitor_id.proxy));
}
#[cfg(feature = "x11")]
Some(Fullscreen::Borderless(_)) => unreachable!(),
None => self.frame.lock().unwrap().unset_fullscreen(),
}