linux: Treat fullscreen as tiled on X11 and prevent resizing while maximized (#13990)

Two quick fixes for issues I noticed:

1. Fullscreening an unmaximized X11 window still showed rounded window
corners and allowed resizing
2. Maximized windows still allowed for resizing on corners due to
missing checks

![image](https://github.com/zed-industries/zed/assets/71973804/47df4de2-4013-4e51-88c3-d33b52a909f5)


Release Notes:

- N/A
This commit is contained in:
apricotbucket28 2024-07-09 11:30:30 -03:00 committed by GitHub
parent 29226170f1
commit 23c84f8dc0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 10 additions and 7 deletions

View file

@ -6658,7 +6658,7 @@ fn resize_edge(
let corner_size = size(shadow_size * 1.5, shadow_size * 1.5);
let top_left_bounds = Bounds::new(Point::new(px(0.), px(0.)), corner_size);
if top_left_bounds.contains(&pos) {
if !tiling.top && top_left_bounds.contains(&pos) {
return Some(ResizeEdge::TopLeft);
}
@ -6666,7 +6666,7 @@ fn resize_edge(
Point::new(window_size.width - corner_size.width, px(0.)),
corner_size,
);
if top_right_bounds.contains(&pos) {
if !tiling.top && top_right_bounds.contains(&pos) {
return Some(ResizeEdge::TopRight);
}
@ -6674,7 +6674,7 @@ fn resize_edge(
Point::new(px(0.), window_size.height - corner_size.height),
corner_size,
);
if bottom_left_bounds.contains(&pos) {
if !tiling.bottom && bottom_left_bounds.contains(&pos) {
return Some(ResizeEdge::BottomLeft);
}
@ -6685,7 +6685,7 @@ fn resize_edge(
),
corner_size,
);
if bottom_right_bounds.contains(&pos) {
if !tiling.bottom && bottom_right_bounds.contains(&pos) {
return Some(ResizeEdge::BottomRight);
}