root: refactor transaction initiation
- require the caller to use Root.startTransaction() directly - introduce View.applyPending() to unify logic - introduce View.shouldTrackConfigure() to unify more logic - update all callsites to intelligently rearrange only what is necessary
This commit is contained in:
@ -31,7 +31,8 @@ pub fn borderWidth(
|
||||
|
||||
const server = seat.input_manager.server;
|
||||
server.config.border_width = try std.fmt.parseInt(u32, args[1], 10);
|
||||
server.root.arrange();
|
||||
server.root.arrangeAll();
|
||||
server.root.startTransaction();
|
||||
}
|
||||
|
||||
pub fn viewPadding(
|
||||
@ -45,7 +46,8 @@ pub fn viewPadding(
|
||||
|
||||
const server = seat.input_manager.server;
|
||||
server.config.view_padding = try std.fmt.parseInt(u32, args[1], 10);
|
||||
server.root.arrange();
|
||||
server.root.arrangeAll();
|
||||
server.root.startTransaction();
|
||||
}
|
||||
|
||||
pub fn outerPadding(
|
||||
@ -59,7 +61,8 @@ pub fn outerPadding(
|
||||
|
||||
const server = seat.input_manager.server;
|
||||
server.config.outer_padding = try std.fmt.parseInt(u32, args[1], 10);
|
||||
server.root.arrange();
|
||||
server.root.arrangeAll();
|
||||
server.root.startTransaction();
|
||||
}
|
||||
|
||||
pub fn backgroundColor(
|
||||
|
Reference in New Issue
Block a user