events: better adjust to unreported sizes for xwayland apps

fixes #3745
This commit is contained in:
Vaxry 2023-11-04 13:09:33 +00:00
parent 200cccdd3b
commit 54e51b7acf

View file

@ -653,6 +653,7 @@ void Events::listener_mapWindow(void* owner, void* data) {
g_pInputManager->simulateMouseMovement();
// fix some xwayland apps that don't behave nicely
PWINDOW->m_vPendingReportedSize = PWINDOW->m_vRealSize.goalv();
PWINDOW->m_vReportedSize = PWINDOW->m_vPendingReportedSize;
}
@ -1013,6 +1014,7 @@ void Events::listener_configureX11(void* owner, void* data) {
if (!PWINDOW->m_uSurface.xwayland->surface || !PWINDOW->m_uSurface.xwayland->surface->mapped || !PWINDOW->m_bMappedX11) {
wlr_xwayland_surface_configure(PWINDOW->m_uSurface.xwayland, E->x, E->y, E->width, E->height);
PWINDOW->m_vReportedSize = {E->width, E->height};
return;
}
@ -1058,6 +1060,8 @@ void Events::listener_configureX11(void* owner, void* data) {
g_pHyprRenderer->damageWindow(PWINDOW);
PWINDOW->updateWindowDecos();
PWINDOW->m_vReportedSize = {E->width, E->height};
}
void Events::listener_unmanagedSetGeometry(void* owner, void* data) {