view: send activated/fullscreen configures immediately
The transaction system exists to coordinate size changes of all views in a layout in order to achieve frame perfection. Since many clients do not need to commit a new buffer in response to a activated state change alone, this breaks things when such a configure event is tracked by the transaction system. Instead, simply send activated and fullscreen configures right away but still track this state in a double-buffered way so that e.g. border color changes based on focus are frame-perfect. This also fixes a related issue with the transaction system where views that did not need to commit in response to our first configure were not rendered until their next frame.
This commit is contained in:
@ -84,7 +84,6 @@ pub fn configure(self: Self) void {
|
||||
const output_box = server.root.output_layout.getBox(output.wlr_output).?;
|
||||
|
||||
const state = &self.view.pending;
|
||||
self.xwayland_surface.setFullscreen(state.fullscreen);
|
||||
self.xwayland_surface.configure(
|
||||
@intCast(i16, state.box.x + output_box.x),
|
||||
@intCast(i16, state.box.y + output_box.y),
|
||||
@ -98,6 +97,14 @@ pub fn close(self: Self) void {
|
||||
self.xwayland_surface.close();
|
||||
}
|
||||
|
||||
pub fn setActivated(self: Self, activated: bool) void {
|
||||
self.xwayland_surface.activate(activated);
|
||||
}
|
||||
|
||||
pub fn setFullscreen(self: Self, fullscreen: bool) void {
|
||||
self.xwayland_surface.setFullscreen(fullscreen);
|
||||
}
|
||||
|
||||
/// Return the surface at output coordinates ox, oy and set sx, sy to the
|
||||
/// corresponding surface-relative coordinates, if there is a surface.
|
||||
pub fn surfaceAt(self: Self, ox: f64, oy: f64, sx: *f64, sy: *f64) ?*wlr.Surface {
|
||||
|
Reference in New Issue
Block a user