Skip to content

Commit a150ff2

Browse files
committed
Also set maximized flag if full screen
1 parent 9151c14 commit a150ff2

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

‎src/window.rs‎

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -366,31 +366,30 @@ impl Window {
366366

367367
pub fn properties(&self) -> Properties {
368368
//TODO: avoid allocation
369-
let mut flags = String::with_capacity(8);
369+
let mut flags = String::with_capacity(9);
370370
if self.asynchronous {
371-
flags.push(ORBITAL_FLAG_ASYNC)
371+
flags.push(ORBITAL_FLAG_ASYNC);
372372
}
373373
if self.borderless {
374-
flags.push(ORBITAL_FLAG_BORDERLESS)
374+
flags.push(ORBITAL_FLAG_BORDERLESS);
375375
}
376376
if self.hidden {
377-
flags.push(ORBITAL_FLAG_HIDDEN)
377+
flags.push(ORBITAL_FLAG_HIDDEN);
378378
}
379379
if let Some((_, position)) = &self.restore {
380+
flags.push(ORBITAL_FLAG_MAXIMIZED);
380381
if matches!(position, TilePosition::FullScreen) {
381-
flags.push(ORBITAL_FLAG_FULLSCREEN)
382-
} else {
383-
flags.push(ORBITAL_FLAG_MAXIMIZED)
382+
flags.push(ORBITAL_FLAG_FULLSCREEN);
384383
}
385384
}
386385
if self.resizable {
387-
flags.push(ORBITAL_FLAG_RESIZABLE)
386+
flags.push(ORBITAL_FLAG_RESIZABLE);
388387
}
389388
if self.transparent {
390-
flags.push(ORBITAL_FLAG_TRANSPARENT)
389+
flags.push(ORBITAL_FLAG_TRANSPARENT);
391390
}
392391
if self.unclosable {
393-
flags.push(ORBITAL_FLAG_UNCLOSABLE)
392+
flags.push(ORBITAL_FLAG_UNCLOSABLE);
394393
}
395394
match self.zorder {
396395
WindowZOrder::Back => flags.push(ORBITAL_FLAG_BACK),

0 commit comments

Comments
 (0)