Stop squaring windowed fullscreen corners with clip-to-geometry
Browse files at this commit464d45daa229f16934399ceb16e94783ed2c241cParent: 97c96a11 changed file +9 -2
- src/layout/mod.rs +9 -2
src/layout/mod.rsmodified+9 -2
| @@ -310,10 +310,17 @@ pub trait LayoutElement { | |||
| 310 | /// are handled externally by the Tile, so the corner radius changes for those modes is also | 310 | /// are handled externally by the Tile, so the corner radius changes for those modes is also |
| 311 | /// handled externally. | 311 | /// handled externally. |
| 312 | fn geometry_corner_radius(&self) -> CornerRadius { | 312 | fn geometry_corner_radius(&self) -> CornerRadius { |
| 313 | - if self.is_windowed_fullscreen() { | 313 | + let rules = self.rules(); |
| 314 | + | ||
| 315 | + // When windows think they're fullscreen, they square their corners. | ||
| 316 | + // | ||
| 317 | + // However, if the user is clipping the window to geometry, they are likely going for | ||
| 318 | + // consistent corner radius, and want this radius to remain in windowed fullscreen. | ||
| 319 | + if self.is_windowed_fullscreen() && rules.clip_to_geometry != Some(true) { | ||
| 314 | return CornerRadius::default(); | 320 | return CornerRadius::default(); |
| 315 | } | 321 | } |
| 316 | - self.rules().geometry_corner_radius.unwrap_or_default() | 322 | + |
| 323 | + rules.geometry_corner_radius.unwrap_or_default() | ||
| 317 | } | 324 | } |
| 318 | 325 | ||
| 319 | fn is_child_of(&self, parent: &Self) -> bool; | 326 | fn is_child_of(&self, parent: &Self) -> bool; |