Skip to content

Commit

Permalink
rustfmt
Browse files Browse the repository at this point in the history
  • Loading branch information
wez committed Sep 22, 2024
1 parent d7938cb commit da0a738
Showing 1 changed file with 16 additions and 5 deletions.
21 changes: 16 additions & 5 deletions window/src/os/wayland/window.rs
Original file line number Diff line number Diff line change
Expand Up @@ -252,9 +252,12 @@ impl WaylandWindow {

window.set_min_size(Some((32, 32)));
let (x, y) = window_frame.location();
window
.xdg_surface()
.set_window_geometry(x, y, dimensions.pixel_width as i32, dimensions.pixel_height as i32);
window.xdg_surface().set_window_geometry(
x,
y,
dimensions.pixel_width as i32,
dimensions.pixel_height as i32,
);
window.commit();

let copy_and_paste = CopyAndPaste::create();
Expand Down Expand Up @@ -1263,12 +1266,20 @@ impl WaylandState {
if let Some((w, h)) = configure.suggested_bounds {
pending_event.configure.replace((w, h));
}
} else if configure.state.contains(SCTKWindowState::TILED_TOP | SCTKWindowState::TILED_BOTTOM) && is_frame_hidden {
} else if configure
.state
.contains(SCTKWindowState::TILED_TOP | SCTKWindowState::TILED_BOTTOM)
&& is_frame_hidden
{
// Tiled window without borders will take exactly half of the screen.
if let Some((w, h)) = configure.suggested_bounds {
pending_event.configure.replace((w / 2, h));
}
} else if configure.state.contains(SCTKWindowState::TILED_LEFT | SCTKWindowState::TILED_RIGHT) && is_frame_hidden {
} else if configure
.state
.contains(SCTKWindowState::TILED_LEFT | SCTKWindowState::TILED_RIGHT)
&& is_frame_hidden
{
// Tiled window without borders will take exactly half of the screen.
if let Some((w, h)) = configure.suggested_bounds {
pending_event.configure.replace((w, h / 2));
Expand Down

0 comments on commit da0a738

Please sign in to comment.