View: only send configures through transactions

This reduces the number of separate configure events sent to clients
through better batching and is also more correct.
This commit is contained in:
Isaac Freund
2023-03-01 20:44:13 +01:00
parent ed0aa73670
commit 83fe764fcd
7 changed files with 39 additions and 82 deletions

View File

@ -658,7 +658,7 @@ pub fn enterMode(self: *Self, mode: enum { move, resize }, view: *View) void {
.offset_x = cur_box.x + cur_box.width - @floatToInt(i32, self.wlr_cursor.x),
.offset_y = cur_box.y + cur_box.height - @floatToInt(i32, self.wlr_cursor.y),
} };
view.setResizing(true);
view.pending.resizing = true;
},
}
@ -690,7 +690,7 @@ fn leaveMode(self: *Self, event: *wlr.Pointer.event.Button) void {
_ = self.seat.wlr_seat.pointerNotifyButton(event.time_msec, event.button, event.state);
},
.move => {},
.resize => |resize| resize.view.setResizing(false),
.resize => |resize| resize.view.pending.resizing = false,
}
self.mode = .passthrough;