mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-22 04:05:58 +01:00
parent
3e67ee0f5f
commit
164e92f8e3
4 changed files with 25 additions and 9 deletions
|
@ -1433,11 +1433,15 @@ void CCompositor::cleanupFadingOut(const int& monid) {
|
|||
bool valid = windowExists(w);
|
||||
|
||||
if (!valid || !w->m_bFadingOut || w->m_fAlpha.value() == 0.f) {
|
||||
if (valid && !w->m_bReadyToDelete)
|
||||
continue;
|
||||
if (valid) {
|
||||
w->m_bFadingOut = false;
|
||||
|
||||
if (!w->m_bReadyToDelete)
|
||||
continue;
|
||||
|
||||
removeWindowFromVectorSafe(w);
|
||||
}
|
||||
|
||||
w->m_bFadingOut = false;
|
||||
removeWindowFromVectorSafe(w);
|
||||
std::erase(m_vWindowsFadingOut, w);
|
||||
|
||||
Debug::log(LOG, "Cleanup: destroyed a window");
|
||||
|
|
|
@ -1137,3 +1137,9 @@ void CWindow::setSuspended(bool suspend) {
|
|||
wlr_xdg_toplevel_set_suspended(m_uSurface.xdg->toplevel, suspend);
|
||||
m_bSuspended = suspend;
|
||||
}
|
||||
|
||||
bool CWindow::visibleOnMonitor(CMonitor* pMonitor) {
|
||||
CBox wbox = {m_vRealPosition.value(), m_vRealSize.value()};
|
||||
|
||||
return wlr_output_layout_intersects(g_pCompositor->m_sWLROutputLayout, pMonitor->output, wbox.pWlr());
|
||||
}
|
||||
|
|
|
@ -395,6 +395,7 @@ class CWindow {
|
|||
bool canBeTorn();
|
||||
bool shouldSendFullscreenState();
|
||||
void setSuspended(bool suspend);
|
||||
bool visibleOnMonitor(CMonitor* pMonitor);
|
||||
|
||||
int getRealBorderSize();
|
||||
void updateSpecialRenderData();
|
||||
|
|
|
@ -335,7 +335,7 @@ void CHyprRenderer::renderWorkspaceWindows(CMonitor* pMonitor, CWorkspace* pWork
|
|||
|
||||
// Non-floating main
|
||||
for (auto& w : g_pCompositor->m_vWindows) {
|
||||
if (w->isHidden() && !w->m_bIsMapped && !w->m_bFadingOut)
|
||||
if (w->isHidden() || (!w->m_bIsMapped && !w->m_bFadingOut))
|
||||
continue;
|
||||
|
||||
if (w->m_bIsFloating)
|
||||
|
@ -362,7 +362,7 @@ void CHyprRenderer::renderWorkspaceWindows(CMonitor* pMonitor, CWorkspace* pWork
|
|||
|
||||
// Non-floating popup
|
||||
for (auto& w : g_pCompositor->m_vWindows) {
|
||||
if (w->isHidden() && !w->m_bIsMapped && !w->m_bFadingOut)
|
||||
if (w->isHidden() || (!w->m_bIsMapped && !w->m_bFadingOut))
|
||||
continue;
|
||||
|
||||
if (w->m_bIsFloating)
|
||||
|
@ -380,7 +380,7 @@ void CHyprRenderer::renderWorkspaceWindows(CMonitor* pMonitor, CWorkspace* pWork
|
|||
|
||||
// floating on top
|
||||
for (auto& w : g_pCompositor->m_vWindows) {
|
||||
if (w->isHidden() && !w->m_bIsMapped && !w->m_bFadingOut)
|
||||
if (w->isHidden() || (!w->m_bIsMapped && !w->m_bFadingOut))
|
||||
continue;
|
||||
|
||||
if (!w->m_bIsFloating || w->m_bPinned)
|
||||
|
@ -410,6 +410,9 @@ void CHyprRenderer::renderWindow(CWindow* pWindow, CMonitor* pMonitor, timespec*
|
|||
return;
|
||||
}
|
||||
|
||||
if (!pWindow->m_bIsMapped)
|
||||
return;
|
||||
|
||||
TRACY_GPU_ZONE("RenderWindow");
|
||||
|
||||
const auto PWORKSPACE = g_pCompositor->getWorkspaceByID(pWindow->m_iWorkspaceID);
|
||||
|
@ -2414,8 +2417,10 @@ void CHyprRenderer::recheckSolitaryForMonitor(CMonitor* pMonitor) {
|
|||
}
|
||||
|
||||
for (auto& w : g_pCompositor->m_vWindows) {
|
||||
if (w->m_iWorkspaceID == PCANDIDATE->m_iWorkspaceID && w->m_bIsFloating && w->m_bCreatedOverFullscreen && !w->isHidden() && (w->m_bIsMapped || w->m_bFadingOut) &&
|
||||
w.get() != PCANDIDATE)
|
||||
if (w.get() == PCANDIDATE || (!w->m_bIsMapped && !w->m_bFadingOut) || w->isHidden())
|
||||
continue;
|
||||
|
||||
if (w->m_iWorkspaceID == PCANDIDATE->m_iWorkspaceID && w->m_bIsFloating && w->m_bCreatedOverFullscreen && w->visibleOnMonitor(pMonitor))
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue