| @@ -255,7 +255,7 @@ pub enum Decorations { · 254 unmodified lines |
| 255 | } | 255 | } |
| 256 | | 256 | |
| 257 | /// What window controls this platform supports | 257 | /// What window controls this platform supports |
| 258 | #[derive(Debug, Copy, Clone, Eq, PartialEq, Hash, Default)] | 258 | #[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] |
| 259 | pub struct WindowControls { | 259 | pub struct WindowControls { |
| 260 | /// Whether this platform supports fullscreen | 260 | /// Whether this platform supports fullscreen |
| 261 | pub fullscreen: bool, | 261 | pub fullscreen: bool, |
| @@ -267,6 +267,18 @@ pub struct WindowControls { · 5 unmodified lines |
| 267 | pub window_menu: bool, | 267 | pub window_menu: bool, |
| 268 | } | 268 | } |
| 269 | | 269 | |
| | 270 | impl Default for WindowControls { |
| | 271 | fn default() -> Self { |
| | 272 | // Assume that we can do anything, unless told otherwise |
| | 273 | Self { |
| | 274 | fullscreen: true, |
| | 275 | maximize: true, |
| | 276 | minimize: true, |
| | 277 | window_menu: true, |
| | 278 | } |
| | 279 | } |
| | 280 | } |
| | 281 | |
| 270 | /// A type to describe which sides of the window are currently tiled in some way | 282 | /// A type to describe which sides of the window are currently tiled in some way |
| 271 | #[derive(Debug, Copy, Clone, Eq, PartialEq, Hash, Default)] | 283 | #[derive(Debug, Copy, Clone, Eq, PartialEq, Hash, Default)] |
| 272 | pub struct Tiling { | 284 | pub struct Tiling { |
| @@ -355,12 +367,7 @@ pub(crate) trait PlatformWindow: HasWindowHandle + HasDisplayHandle { · 82 unmodified lines |
| 355 | } | 367 | } |
| 356 | fn set_app_id(&mut self, _app_id: &str) {} | 368 | fn set_app_id(&mut self, _app_id: &str) {} |
| 357 | fn window_controls(&self) -> WindowControls { | 369 | fn window_controls(&self) -> WindowControls { |
| 358 | WindowControls { | 370 | WindowControls::default() |
| 359 | fullscreen: true, | | |
| 360 | maximize: true, | | |
| 361 | minimize: true, | | |
| 362 | window_menu: false, | | |
| 363 | } | | |
| 364 | } | 371 | } |
| 365 | fn set_client_inset(&self, _inset: Pixels) {} | 372 | fn set_client_inset(&self, _inset: Pixels) {} |
| 366 | fn gpu_specs(&self) -> Option<GPUSpecs>; | 373 | fn gpu_specs(&self) -> Option<GPUSpecs>; |