mirror of
https://github.com/hyprwm/hyprland-plugins.git
synced 2024-11-07 20:25:57 +01:00
parent
4d7f0b5d8b
commit
81bda675ee
4 changed files with 7 additions and 7 deletions
|
@ -71,7 +71,7 @@ CRegion hkWLSurfaceDamage(CWLSurface* thisptr) {
|
|||
static auto* const PCLASS = (Hyprlang::STRING const*)HyprlandAPI::getConfigValue(PHANDLE, "plugin:csgo-vulkan-fix:class")->getDataStaticPtr();
|
||||
|
||||
if (thisptr->exists() && thisptr->getWindow() && thisptr->getWindow()->m_szInitialClass == *PCLASS) {
|
||||
const auto PMONITOR = g_pCompositor->getMonitorFromID(thisptr->getWindow()->m_iMonitorID);
|
||||
const auto PMONITOR = thisptr->getWindow()->m_pMonitor.lock();
|
||||
if (PMONITOR)
|
||||
g_pHyprRenderer->damageMonitor(PMONITOR);
|
||||
else
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
CHyprBar::CHyprBar(PHLWINDOW pWindow) : IHyprWindowDecoration(pWindow) {
|
||||
m_pWindow = pWindow;
|
||||
|
||||
const auto PMONITOR = g_pCompositor->getMonitorFromID(pWindow->m_iMonitorID);
|
||||
const auto PMONITOR = pWindow->m_pMonitor.lock();
|
||||
PMONITOR->scheduledRecalc = true;
|
||||
|
||||
m_pMouseButtonCallback = HyprlandAPI::registerCallbackDynamic(
|
||||
|
|
|
@ -76,7 +76,7 @@ COverview::COverview(PHLWORKSPACE startedOn_, bool swipe_) : startedOn(startedOn
|
|||
|
||||
auto PWORKSPACESTART = g_pCompositor->getWorkspaceByID(currentID);
|
||||
if (!PWORKSPACESTART)
|
||||
PWORKSPACESTART = CWorkspace::create(currentID, pMonitor->ID, std::to_string(currentID));
|
||||
PWORKSPACESTART = CWorkspace::create(currentID, pMonitor.lock(), std::to_string(currentID));
|
||||
|
||||
pMonitor->activeWorkspace = PWORKSPACESTART;
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@ void onNewWindow(PHLWINDOW pWindow) {
|
|||
if (pWindow->m_szInitialClass != *PCLASS)
|
||||
return;
|
||||
|
||||
const auto PMONITOR = g_pCompositor->getMonitorFromID(pWindow->m_iMonitorID);
|
||||
const auto PMONITOR = pWindow->m_pMonitor.lock();
|
||||
|
||||
if (!PMONITOR)
|
||||
return;
|
||||
|
@ -73,7 +73,7 @@ void onRenderStage(eRenderStage stage) {
|
|||
for (auto& bg : bgWindows) {
|
||||
const auto bgw = bg.lock();
|
||||
|
||||
if (bgw->m_iMonitorID != g_pHyprOpenGL->m_RenderData.pMonitor->ID)
|
||||
if (bgw->m_pMonitor != g_pHyprOpenGL->m_RenderData.pMonitor)
|
||||
continue;
|
||||
|
||||
timespec now;
|
||||
|
@ -100,7 +100,7 @@ void onCommitSubsurface(CSubsurface* thisptr) {
|
|||
PWINDOW->m_bHidden = false;
|
||||
|
||||
((origCommitSubsurface)subsurfaceHook->m_pOriginal)(thisptr);
|
||||
if (const auto MON = g_pCompositor->getMonitorFromID(PWINDOW->m_iMonitorID); MON)
|
||||
if (const auto MON = PWINDOW->m_pMonitor.lock(); MON)
|
||||
g_pHyprOpenGL->markBlurDirtyForMonitor(MON);
|
||||
|
||||
PWINDOW->m_bHidden = true;
|
||||
|
@ -118,7 +118,7 @@ void onCommit(void* owner, void* data) {
|
|||
PWINDOW->m_bHidden = false;
|
||||
|
||||
((origCommit)commitHook->m_pOriginal)(owner, data);
|
||||
if (const auto MON = g_pCompositor->getMonitorFromID(PWINDOW->m_iMonitorID); MON)
|
||||
if (const auto MON = PWINDOW->m_pMonitor.lock(); MON)
|
||||
g_pHyprOpenGL->markBlurDirtyForMonitor(MON);
|
||||
|
||||
PWINDOW->m_bHidden = true;
|
||||
|
|
Loading…
Reference in a new issue