view: handle setting fullscreen in configure()

This commit is contained in:
Isaac Freund
2020-08-11 22:32:32 +02:00
parent 2669a615b6
commit bd99428766
4 changed files with 3 additions and 19 deletions

View File

@ -66,6 +66,7 @@ pub fn needsConfigure(self: Self) bool {
/// Apply pending state
pub fn configure(self: Self) void {
const state = &self.view.pending;
c.wlr_xwayland_surface_set_fullscreen(self.wlr_xwayland_surface, state.fullscreen);
c.wlr_xwayland_surface_configure(
self.wlr_xwayland_surface,
@intCast(i16, state.box.x),
@ -81,10 +82,6 @@ pub fn configure(self: Self) void {
self.view.pending_serial = 0x66666666;
}
pub fn setFullscreen(self: Self, fullscreen: bool) void {
c.wlr_xwayland_surface_set_fullscreen(self.wlr_xwayland_surface, fullscreen);
}
/// Close the view. This will lead to the unmap and destroy events being sent
pub fn close(self: Self) void {
c.wlr_xwayland_surface_close(self.wlr_xwayland_surface);