Allow introspection of WindowBuilder attributes
Makes WindowAttributes public and adds window_attributes() getter to WindowBuilder. In version 0.27, the WindowAttributes struct was made private, but this removed the ability to introspect the default WindowBuilder values.
This commit is contained in:
parent
b457329003
commit
422c6b1987
8 changed files with 18 additions and 10 deletions
|
|
@ -455,7 +455,7 @@ impl WinitUIWindow {
|
|||
|
||||
this.setRootViewController(Some(view_controller));
|
||||
|
||||
match window_attributes.fullscreen {
|
||||
match window_attributes.fullscreen.clone().map(Into::into) {
|
||||
Some(Fullscreen::Exclusive(ref video_mode)) => {
|
||||
let monitor = video_mode.monitor();
|
||||
let screen = monitor.ui_screen();
|
||||
|
|
|
|||
|
|
@ -416,7 +416,8 @@ impl Window {
|
|||
// TODO: transparency, visible
|
||||
|
||||
let main_screen = UIScreen::main(mtm);
|
||||
let screen = match window_attributes.fullscreen {
|
||||
let fullscreen = window_attributes.fullscreen.clone().map(Into::into);
|
||||
let screen = match fullscreen {
|
||||
Some(Fullscreen::Exclusive(ref video_mode)) => video_mode.monitor.ui_screen(),
|
||||
Some(Fullscreen::Borderless(Some(ref monitor))) => monitor.ui_screen(),
|
||||
Some(Fullscreen::Borderless(None)) | None => &main_screen,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue