force sending size on setWindowFullscreen

This commit is contained in:
Vaxry 2022-08-16 16:30:10 +02:00
parent 7cde50a018
commit daeb0d3418
3 changed files with 6 additions and 3 deletions

View file

@ -1391,11 +1391,14 @@ void CCompositor::setWindowFullscreen(CWindow* pWindow, bool on, eFullscreenMode
g_pLayoutManager->getCurrentLayout()->fullscreenRequestForWindow(pWindow, mode, on); g_pLayoutManager->getCurrentLayout()->fullscreenRequestForWindow(pWindow, mode, on);
g_pXWaylandManager->setWindowFullscreen(pWindow, pWindow->m_bIsFullscreen && mode == FULLSCREEN_FULL); g_pXWaylandManager->setWindowFullscreen(pWindow, pWindow->m_bIsFullscreen && mode == FULLSCREEN_FULL);
// make all windows on the same workspace under the fullscreen window // make all windows on the same workspace under the fullscreen window
for (auto& w : g_pCompositor->m_vWindows) { for (auto& w : g_pCompositor->m_vWindows) {
if (w->m_iWorkspaceID == pWindow->m_iWorkspaceID) if (w->m_iWorkspaceID == pWindow->m_iWorkspaceID)
w->m_bCreatedOverFullscreen = false; w->m_bCreatedOverFullscreen = false;
} }
g_pXWaylandManager->setWindowSize(pWindow, pWindow->m_vRealSize.goalv(), true);
} }
void CCompositor::moveUnmanagedX11ToWindows(CWindow* pWindow) { void CCompositor::moveUnmanagedX11ToWindows(CWindow* pWindow) {

View file

@ -120,9 +120,9 @@ void CHyprXWaylandManager::sendCloseWindow(CWindow* pWindow) {
} }
} }
void CHyprXWaylandManager::setWindowSize(CWindow* pWindow, const Vector2D& size) { void CHyprXWaylandManager::setWindowSize(CWindow* pWindow, const Vector2D& size, bool force) {
if ((pWindow->m_vReportedSize == size && pWindow->m_vRealPosition.vec() == pWindow->m_vReportedPosition) || (pWindow->m_vReportedSize == size && !pWindow->m_bIsX11)) if (!force && ((pWindow->m_vReportedSize == size && pWindow->m_vRealPosition.vec() == pWindow->m_vReportedPosition) || (pWindow->m_vReportedSize == size && !pWindow->m_bIsX11)))
return; return;
pWindow->m_vReportedPosition = pWindow->m_vRealPosition.vec(); pWindow->m_vReportedPosition = pWindow->m_vRealPosition.vec();

View file

@ -17,7 +17,7 @@ public:
std::string getTitle(CWindow*); std::string getTitle(CWindow*);
std::string getAppIDClass(CWindow*); std::string getAppIDClass(CWindow*);
void sendCloseWindow(CWindow*); void sendCloseWindow(CWindow*);
void setWindowSize(CWindow*, const Vector2D&); void setWindowSize(CWindow*, const Vector2D&, bool force = false);
void setWindowStyleTiled(CWindow*, uint32_t); void setWindowStyleTiled(CWindow*, uint32_t);
void setWindowFullscreen(CWindow*, bool); void setWindowFullscreen(CWindow*, bool);
wlr_surface* surfaceAt(CWindow*, const Vector2D&, Vector2D&); wlr_surface* surfaceAt(CWindow*, const Vector2D&, Vector2D&);