aboutsummaryrefslogtreecommitdiff
path: root/src/layout/tile.rs
diff options
context:
space:
mode:
authorIvan Molodetskikh <yalterz@gmail.com>2024-08-22 14:44:11 +0300
committerIvan Molodetskikh <yalterz@gmail.com>2024-08-22 15:19:11 +0300
commit7bfdf87bf0138d602888fc3167921bc1d029b0ab (patch)
tree48664b930f00be78f4c232a838b8ea4c5254db49 /src/layout/tile.rs
parentcf357d7058910864018c3e3702a9723194fce916 (diff)
downloadniri-7bfdf87bf0138d602888fc3167921bc1d029b0ab.tar.gz
niri-7bfdf87bf0138d602888fc3167921bc1d029b0ab.tar.bz2
niri-7bfdf87bf0138d602888fc3167921bc1d029b0ab.zip
Implement resize transactions
Diffstat (limited to 'src/layout/tile.rs')
-rw-r--r--src/layout/tile.rs11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/layout/tile.rs b/src/layout/tile.rs
index a701e96f..11c266d4 100644
--- a/src/layout/tile.rs
+++ b/src/layout/tile.rs
@@ -23,6 +23,7 @@ use crate::render_helpers::resize::ResizeRenderElement;
use crate::render_helpers::snapshot::RenderSnapshot;
use crate::render_helpers::solid_color::{SolidColorBuffer, SolidColorRenderElement};
use crate::render_helpers::{render_to_encompassing_texture, RenderTarget};
+use crate::utils::transaction::Transaction;
/// Toplevel window with decorations.
#[derive(Debug)]
@@ -503,7 +504,12 @@ impl<W: LayoutElement> Tile<W> {
activation_region.contains(point)
}
- pub fn request_tile_size(&mut self, mut size: Size<f64, Logical>, animate: bool) {
+ pub fn request_tile_size(
+ &mut self,
+ mut size: Size<f64, Logical>,
+ animate: bool,
+ transaction: Option<Transaction>,
+ ) {
// Can't go through effective_border_width() because we might be fullscreen.
if !self.border.is_off() {
let width = self.border.width();
@@ -514,7 +520,8 @@ impl<W: LayoutElement> Tile<W> {
// The size request has to be i32 unfortunately, due to Wayland. We floor here instead of
// round to avoid situations where proportionally-sized columns don't fit on the screen
// exactly.
- self.window.request_size(size.to_i32_floor(), animate);
+ self.window
+ .request_size(size.to_i32_floor(), animate, transaction);
}
pub fn tile_width_for_window_width(&self, size: f64) -> f64 {