remove old comment and fixup lsl var name

This commit is contained in:
vaxerski 2023-01-22 17:03:25 +01:00
parent 147be3e10b
commit cb98242ea7
9 changed files with 41 additions and 43 deletions

View file

@ -193,10 +193,10 @@ void CMonitor::onDisconnect() {
hyprListener_monitorFrame.removeCallback();
for (size_t i = 0; i < 4; ++i) {
for (auto& ls : m_aLayerSurfaceLists[i]) {
for (auto& ls : m_aLayerSurfaceLayers[i]) {
wlr_layer_surface_v1_destroy(ls->layerSurface);
}
m_aLayerSurfaceLists[i].clear();
m_aLayerSurfaceLayers[i].clear();
}
Debug::log(LOG, "Removed monitor %s!", szName.c_str());

View file

@ -47,12 +47,9 @@ class CMonitor {
std::vector<CMonitor*> mirrors;
// for the special workspace. 0 means not open.
int specialWorkspaceID = 0;
int specialWorkspaceID = 0;
// Double-linked list because we need to have constant mem addresses for signals
// We have to store pointers and use raw new/delete because they might be moved between them
// and I am lazy
std::array<std::vector<std::unique_ptr<SLayerSurface>>, 4> m_aLayerSurfaceLists;
std::array<std::vector<std::unique_ptr<SLayerSurface>>, 4> m_aLayerSurfaceLayers;
DYNLISTENER(monitorFrame);
DYNLISTENER(monitorDestroy);

View file

@ -100,7 +100,7 @@ void CWorkspace::startAnim(bool in, bool left, bool instant) {
// check LS-es
if (in && !m_bIsSpecialWorkspace) {
const auto PMONITOR = g_pCompositor->getMonitorFromID(m_iMonitorID);
for (auto& ls : PMONITOR->m_aLayerSurfaceLists[ZWLR_LAYER_SHELL_V1_LAYER_TOP]) {
for (auto& ls : PMONITOR->m_aLayerSurfaceLayers[ZWLR_LAYER_SHELL_V1_LAYER_TOP]) {
if (!ls->fadingOut)
ls->alpha = m_bHasFullscreenWindow && m_efFullscreenMode == FULLSCREEN_FULL ? 0.f : 1.f;
}