transactions: handle preemption properly
when a transaction interrupts an ongoing transaction, we must be careful to handle the configures properly. This commit adds a new member to view so that we can store the dimensions sent with the last configure in order to determine if the preempting transaction should override the ongoing configure or not. Additionally, some views do not ack a configure if they already have the requested dimensions. This can happen if a pending configure setting alternative dimensions is overridden, so in this case we do not wait for an ack before committing the transaction.
This commit is contained in:
@ -63,11 +63,11 @@ pub fn init(self: *Self, view: *View, wlr_xdg_surface: *c.wlr_xdg_surface) void
|
||||
c.wl_signal_add(&self.wlr_xdg_surface.events.unmap, &self.listen_unmap);
|
||||
}
|
||||
|
||||
pub fn configure(self: Self, pending_box: Box) void {
|
||||
pub fn configure(self: Self, box: Box) void {
|
||||
self.view.pending_serial = c.wlr_xdg_toplevel_set_size(
|
||||
self.wlr_xdg_surface,
|
||||
pending_box.width,
|
||||
pending_box.height,
|
||||
box.width,
|
||||
box.height,
|
||||
);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user