Skip to content

Commit

Permalink
report sizes to all windows on fullscreen
Browse files Browse the repository at this point in the history
  • Loading branch information
vaxerski committed Aug 22, 2022
1 parent e97fa4e commit d0ec2b7
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/Compositor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1405,6 +1405,8 @@ void CCompositor::setWindowFullscreen(CWindow* pWindow, bool on, eFullscreenMode
}

g_pXWaylandManager->setWindowSize(pWindow, pWindow->m_vRealSize.goalv(), true);

forceReportSizesToWindowsOnWorkspace(pWindow->m_iWorkspaceID);
}

void CCompositor::moveUnmanagedX11ToWindows(CWindow* pWindow) {
Expand Down Expand Up @@ -1604,4 +1606,12 @@ Vector2D CCompositor::parseWindowVectorArgsRelative(const std::string& args, con
const int Y = std::stoi(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);
}
}
}
1 change: 1 addition & 0 deletions src/Compositor.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ class CCompositor {
SLayerSurface* getLayerSurfaceFromSurface(wlr_surface*);
void closeWindow(CWindow*);
Vector2D parseWindowVectorArgsRelative(const std::string&, const Vector2D&);
void forceReportSizesToWindowsOnWorkspace(const int&);


std::string explicitConfigPath;
Expand Down

0 comments on commit d0ec2b7

Please sign in to comment.