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

@ -82,6 +82,7 @@ pub fn needsConfigure(self: Self) bool {
pub fn configure(self: Self) void {
const state = &self.view.pending;
_ = c.wlr_xdg_toplevel_set_activated(self.wlr_xdg_surface, state.focus != 0);
_ = c.wlr_xdg_toplevel_set_fullscreen(self.wlr_xdg_surface, state.fullscreen);
self.view.pending_serial = c.wlr_xdg_toplevel_set_size(
self.wlr_xdg_surface,
state.box.width,
@ -89,10 +90,6 @@ pub fn configure(self: Self) void {
);
}
pub fn setFullscreen(self: Self, fullscreen: bool) void {
_ = c.wlr_xdg_toplevel_set_fullscreen(self.wlr_xdg_surface, fullscreen);
}
/// Close the view. This will lead to the unmap and destroy events being sent
pub fn close(self: Self) void {
c.wlr_xdg_toplevel_send_close(self.wlr_xdg_surface);