[wayland] Ignore decoration updates if initial state isn't committed yet
or else we might send an unexpected configure event.icc-effect-master
parent
1013ee1bd0
commit
f7a67e0edc
|
@ -1330,6 +1330,8 @@ void XdgToplevelClient::initialize()
|
||||||
|
|
||||||
bool needsPlacement = !isInitialPositionSet();
|
bool needsPlacement = !isInitialPositionSet();
|
||||||
|
|
||||||
|
updateDecoration(false, false);
|
||||||
|
|
||||||
if (supportsWindowRules()) {
|
if (supportsWindowRules()) {
|
||||||
setupWindowRules(false);
|
setupWindowRules(false);
|
||||||
|
|
||||||
|
@ -1449,13 +1451,15 @@ void XdgToplevelClient::installXdgDecoration(XdgToplevelDecorationV1Interface *d
|
||||||
m_xdgDecoration = decoration;
|
m_xdgDecoration = decoration;
|
||||||
|
|
||||||
connect(m_xdgDecoration, &XdgToplevelDecorationV1Interface::destroyed, this, [this] {
|
connect(m_xdgDecoration, &XdgToplevelDecorationV1Interface::destroyed, this, [this] {
|
||||||
if (!isClosing()) {
|
if (!isClosing() && m_isInitialized) {
|
||||||
updateDecoration(/* check_workspace_pos */ true);
|
updateDecoration(/* check_workspace_pos */ true);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
connect(m_xdgDecoration, &XdgToplevelDecorationV1Interface::preferredModeChanged, this, [this] {
|
connect(m_xdgDecoration, &XdgToplevelDecorationV1Interface::preferredModeChanged, this, [this] {
|
||||||
// force is true as we must send a new configure response.
|
if (m_isInitialized) {
|
||||||
updateDecoration(/* check_workspace_pos */ false, /* force */ true);
|
// force is true as we must send a new configure response.
|
||||||
|
updateDecoration(/* check_workspace_pos */ false, /* force */ true);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue