xdg: manually schedule initial configures

chasing wlroots

fixes #4801
This commit is contained in:
Vaxry 2024-02-22 17:33:16 +00:00
parent 28410922da
commit d9757b61bf
2 changed files with 10 additions and 0 deletions

View File

@ -228,6 +228,11 @@ void Events::listener_unmapPopupXDG(void* owner, void* data) {
void Events::listener_commitPopupXDG(void* owner, void* data) {
SXDGPopup* PPOPUP = (SXDGPopup*)owner;
if (PPOPUP->popup->base->initial_commit) {
wlr_xdg_surface_schedule_configure(PPOPUP->popup->base);
return;
}
if (g_pCompositor->windowValidMapped(PPOPUP->parentWindow)) {
PPOPUP->lx = PPOPUP->parentWindow->m_vRealPosition.vec().x;
PPOPUP->ly = PPOPUP->parentWindow->m_vRealPosition.vec().y;

View File

@ -804,6 +804,11 @@ void Events::listener_ackConfigure(void* owner, void* data) {
void Events::listener_commitWindow(void* owner, void* data) {
CWindow* PWINDOW = (CWindow*)owner;
if (!PWINDOW->m_bIsX11 && PWINDOW->m_uSurface.xdg->initial_commit) {
wlr_xdg_toplevel_set_size(PWINDOW->m_uSurface.xdg->toplevel, 0, 0);
return;
}
if (!PWINDOW->m_bIsMapped || PWINDOW->isHidden())
return;