xdg_surface: send initial configure once after the initial commit
This commit is contained in:
parent
9acf6af268
commit
92be3d6db1
1 changed files with 7 additions and 10 deletions
|
|
@ -75,6 +75,7 @@ pub struct XdgSurface {
|
||||||
popups: CopyHashMap<XdgPopupId, Rc<Popup>>,
|
popups: CopyHashMap<XdgPopupId, Rc<Popup>>,
|
||||||
pub workspace: CloneCell<Option<Rc<WorkspaceNode>>>,
|
pub workspace: CloneCell<Option<Rc<WorkspaceNode>>>,
|
||||||
pub tracker: Tracker<Self>,
|
pub tracker: Tracker<Self>,
|
||||||
|
have_initial_commit: Cell<bool>,
|
||||||
}
|
}
|
||||||
|
|
||||||
struct Popup {
|
struct Popup {
|
||||||
|
|
@ -190,6 +191,7 @@ impl XdgSurface {
|
||||||
popups: Default::default(),
|
popups: Default::default(),
|
||||||
workspace: Default::default(),
|
workspace: Default::default(),
|
||||||
tracker: Default::default(),
|
tracker: Default::default(),
|
||||||
|
have_initial_commit: Default::default(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -489,16 +491,11 @@ impl SurfaceExt for XdgSurface {
|
||||||
self: Rc<Self>,
|
self: Rc<Self>,
|
||||||
pending: &mut PendingState,
|
pending: &mut PendingState,
|
||||||
) -> Result<(), WlSurfaceError> {
|
) -> Result<(), WlSurfaceError> {
|
||||||
{
|
if !self.have_initial_commit.get() {
|
||||||
let ase = self.acked_serial.get();
|
if let Some(ext) = self.ext.get() {
|
||||||
let rse = self.requested_serial.get();
|
ext.initial_configure()?;
|
||||||
if ase != Some(rse) {
|
self.do_send_configure();
|
||||||
if ase.is_none() {
|
self.have_initial_commit.set(true);
|
||||||
if let Some(ext) = self.ext.get() {
|
|
||||||
ext.initial_configure()?;
|
|
||||||
}
|
|
||||||
self.send_configure(rse);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if let Some(pending) = &mut pending.xdg_surface {
|
if let Some(pending) = &mut pending.xdg_surface {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue