Skip to content

Commit

Permalink
bug fix: Add back missing commit for xdg surfaces that need configure
Browse files Browse the repository at this point in the history
  • Loading branch information
maxhbooth committed Apr 18, 2024
1 parent 699cf83 commit 02f6034
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/xwayland_xdg_shell/compositor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -484,6 +484,9 @@ pub fn commit_inner(
}

xwayland_surface.try_attach_buffer(&state.client_state.qh);
}

if xwayland_surface.ready() || xwayland_surface.needs_configure() {
xwayland_surface.commit();
}

Expand Down
8 changes: 8 additions & 0 deletions src/xwayland_xdg_shell/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,14 @@ impl XWaylandSurface {
}
}

fn needs_configure(&self) -> bool {
match &self.role {
Some(Role::XdgToplevel(toplevel)) if !toplevel.configured => true,
Some(Role::XdgPopup(popup)) if !popup.configured => true,
_ => false,
}
}

fn try_attach_buffer(&mut self, qh: &QueueHandle<WprsState>) {
if !self.buffer_attached {
if let Some(buffer) = &self.buffer {
Expand Down

0 comments on commit 02f6034

Please sign in to comment.