report sizes to all windows on fullscreen

This commit is contained in:
vaxerski 2022-08-22 14:22:21 +02:00
parent e97fa4e26b
commit d0ec2b72ae
2 changed files with 11 additions and 0 deletions

View file

@ -1405,6 +1405,8 @@ void CCompositor::setWindowFullscreen(CWindow* pWindow, bool on, eFullscreenMode
} }
g_pXWaylandManager->setWindowSize(pWindow, pWindow->m_vRealSize.goalv(), true); g_pXWaylandManager->setWindowSize(pWindow, pWindow->m_vRealSize.goalv(), true);
forceReportSizesToWindowsOnWorkspace(pWindow->m_iWorkspaceID);
} }
void CCompositor::moveUnmanagedX11ToWindows(CWindow* pWindow) { void CCompositor::moveUnmanagedX11ToWindows(CWindow* pWindow) {
@ -1605,3 +1607,11 @@ Vector2D CCompositor::parseWindowVectorArgsRelative(const std::string& args, con
return Vector2D(X + relativeTo.x, Y + relativeTo.y); return Vector2D(X + relativeTo.x, Y + relativeTo.y);
} }
void CCompositor::forceReportSizesToWindowsOnWorkspace(const int& wid) {
for (auto& w : m_vWindows) {
if (w->m_iWorkspaceID == wid && w->m_bIsMapped && !w->m_bHidden) {
g_pXWaylandManager->setWindowSize(w.get(), w->m_vRealSize.vec(), true);
}
}
}

View file

@ -158,6 +158,7 @@ public:
SLayerSurface* getLayerSurfaceFromSurface(wlr_surface*); SLayerSurface* getLayerSurfaceFromSurface(wlr_surface*);
void closeWindow(CWindow*); void closeWindow(CWindow*);
Vector2D parseWindowVectorArgsRelative(const std::string&, const Vector2D&); Vector2D parseWindowVectorArgsRelative(const std::string&, const Vector2D&);
void forceReportSizesToWindowsOnWorkspace(const int&);
std::string explicitConfigPath; std::string explicitConfigPath;