| @@ -255,7 +255,7 @@ pub enum Decorations { · 254 unmodified lines |
| 255 | 255 | } |
| 256 | 256 | |
| 257 | 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 | 259 | pub struct WindowControls { |
| 260 | 260 | /// Whether this platform supports fullscreen |
| 261 | 261 | pub fullscreen: bool, |
| @@ -267,6 +267,18 @@ pub struct WindowControls { · 5 unmodified lines |
| 267 | 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 | 282 | /// A type to describe which sides of the window are currently tiled in some way |
| 271 | 283 | #[derive(Debug, Copy, Clone, Eq, PartialEq, Hash, Default)] |
| 272 | 284 | pub struct Tiling { |
| @@ -355,12 +367,7 @@ pub(crate) trait PlatformWindow: HasWindowHandle + HasDisplayHandle { · 82 unmodified lines |
| 355 | 367 | } |
| 356 | 368 | fn set_app_id(&mut self, _app_id: &str) {} |
| 357 | 369 | fn window_controls(&self) -> WindowControls { |
| 358 | | − WindowControls { |
| 359 | | − fullscreen: true, |
| 360 | | − maximize: true, |
| 361 | | − minimize: true, |
| 362 | | − window_menu: false, |
| 363 | | − } |
| 370 | + WindowControls::default() |
| 364 | 371 | } |
| 365 | 372 | fn set_client_inset(&self, _inset: Pixels) {} |
| 366 | 373 | fn gpu_specs(&self) -> Option<GPUSpecs>; |