@@ -19,6 +19,7 @@ const ORBITAL_FLAG_FRONT: char = 'f';
1919const ORBITAL_FLAG_HIDDEN : char = 'h' ;
2020const ORBITAL_FLAG_BORDERLESS : char = 'l' ;
2121const ORBITAL_FLAG_MAXIMIZED : char = 'm' ;
22+ const ORBITAL_FLAG_FULLSCREEN : char = 'M' ;
2223const ORBITAL_FLAG_RESIZABLE : char = 'r' ;
2324const ORBITAL_FLAG_TRANSPARENT : char = 't' ;
2425
@@ -55,16 +56,17 @@ impl Window {
5556 // Async by default.
5657 let mut flag_str = ORBITAL_FLAG_ASYNC . to_string ( ) ;
5758
58- if attrs. maximized {
59+ // Fullscreen takes precedence over maximize
60+ if let Some ( Fullscreen :: Borderless ( _) ) = attrs. fullscreen {
61+ flag_str. push ( ORBITAL_FLAG_FULLSCREEN ) ;
62+ } else if attrs. maximized {
5963 flag_str. push ( ORBITAL_FLAG_MAXIMIZED ) ;
6064 }
6165
6266 if attrs. resizable {
6367 flag_str. push ( ORBITAL_FLAG_RESIZABLE ) ;
6468 }
6569
66- // TODO: fullscreen
67-
6870 if attrs. transparent {
6971 flag_str. push ( ORBITAL_FLAG_TRANSPARENT ) ;
7072 }
@@ -323,10 +325,28 @@ impl CoreWindow for Window {
323325 self . get_flag ( ORBITAL_FLAG_MAXIMIZED ) . unwrap_or ( false )
324326 }
325327
326- fn set_fullscreen ( & self , _monitor : Option < Fullscreen > ) { }
328+ fn set_fullscreen ( & self , fullscreen : Option < Fullscreen > ) {
329+ match fullscreen {
330+ Some ( Fullscreen :: Exclusive ( ..) ) => {
331+ // TODO: exclusive fullscreen not supported on orbital
332+ } ,
333+ Some ( Fullscreen :: Borderless ( _monitor) ) => {
334+ // TODO: monitor selection not supported on orbital
335+ let _ = self . set_flag ( ORBITAL_FLAG_FULLSCREEN , true ) ;
336+ } ,
337+ None => {
338+ let _ = self . set_flag ( ORBITAL_FLAG_FULLSCREEN , false ) ;
339+ } ,
340+ }
341+ }
327342
328343 fn fullscreen ( & self ) -> Option < Fullscreen > {
329- None
344+ if self . get_flag ( ORBITAL_FLAG_FULLSCREEN ) . unwrap_or ( false ) {
345+ // TODO: monitor selection not supported on orbital
346+ Some ( Fullscreen :: Borderless ( None ) )
347+ } else {
348+ None
349+ }
330350 }
331351
332352 #[ inline]
0 commit comments