aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/render/OpenGL.cpp
diff options
context:
space:
mode:
authorVaxry <[email protected]>2024-10-27 18:23:01 +0000
committerVaxry <[email protected]>2024-10-27 18:23:01 +0000
commit24d218964bb099b8aa7c4b913a63389d0b3be203 (patch)
treefccb9c0e2371fe3851ace3fd6b15a5b9deda84d2 /src/render/OpenGL.cpp
parentf9b52203f58bcb716144d89ee9f85fe12ebfe94d (diff)
downloadHyprland-24d218964bb099b8aa7c4b913a63389d0b3be203.tar.gz
Hyprland-24d218964bb099b8aa7c4b913a63389d0b3be203.zip
move to monitor pointersmove-to-monitor-p
Diffstat (limited to 'src/render/OpenGL.cpp')
-rw-r--r--src/render/OpenGL.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/render/OpenGL.cpp b/src/render/OpenGL.cpp
index fc2d1012..9e524fa4 100644
--- a/src/render/OpenGL.cpp
+++ b/src/render/OpenGL.cpp
@@ -693,7 +693,7 @@ bool CHyprOpenGLImpl::passRequiresIntrospection(PHLMONITOR pMonitor) {
if (*PBLURSPECIAL) {
for (auto const& ws : g_pCompositor->m_vWorkspaces) {
- if (!ws->m_bIsSpecialWorkspace || ws->m_iMonitorID != pMonitor->ID)
+ if (!ws->m_bIsSpecialWorkspace || ws->m_pMonitor != pMonitor)
continue;
if (ws->m_fAlpha.value() == 0)
@@ -2219,7 +2219,7 @@ void CHyprOpenGLImpl::renderBorder(CBox* box, const CGradientValueData& grad, in
void CHyprOpenGLImpl::makeRawWindowSnapshot(PHLWINDOW pWindow, CFramebuffer* pFramebuffer) {
// we trust the window is valid.
- const auto PMONITOR = g_pCompositor->getMonitorFromID(pWindow->m_iMonitorID);
+ const auto PMONITOR = pWindow->m_pMonitor.lock();
if (!PMONITOR || !PMONITOR->output || PMONITOR->vecPixelSize.x <= 0 || PMONITOR->vecPixelSize.y <= 0)
return;
@@ -2267,7 +2267,7 @@ void CHyprOpenGLImpl::makeRawWindowSnapshot(PHLWINDOW pWindow, CFramebuffer* pFr
void CHyprOpenGLImpl::makeWindowSnapshot(PHLWINDOW pWindow) {
// we trust the window is valid.
- const auto PMONITOR = g_pCompositor->getMonitorFromID(pWindow->m_iMonitorID);
+ const auto PMONITOR = pWindow->m_pMonitor.lock();
if (!PMONITOR || !PMONITOR->output || PMONITOR->vecPixelSize.x <= 0 || PMONITOR->vecPixelSize.y <= 0)
return;
@@ -2319,7 +2319,7 @@ void CHyprOpenGLImpl::makeWindowSnapshot(PHLWINDOW pWindow) {
void CHyprOpenGLImpl::makeLayerSnapshot(PHLLS pLayer) {
// we trust the window is valid.
- const auto PMONITOR = g_pCompositor->getMonitorFromID(pLayer->monitorID);
+ const auto PMONITOR = pLayer->monitor.lock();
if (!PMONITOR || !PMONITOR->output || PMONITOR->vecPixelSize.x <= 0 || PMONITOR->vecPixelSize.y <= 0)
return;
@@ -2372,7 +2372,7 @@ void CHyprOpenGLImpl::renderSnapshot(PHLWINDOW pWindow) {
if (!FBDATA->m_cTex->m_iTexID)
return;
- const auto PMONITOR = g_pCompositor->getMonitorFromID(pWindow->m_iMonitorID);
+ const auto PMONITOR = pWindow->m_pMonitor.lock();
CBox windowBox;
// some mafs to figure out the correct box
@@ -2411,7 +2411,7 @@ void CHyprOpenGLImpl::renderSnapshot(PHLLS pLayer) {
if (!FBDATA->m_cTex->m_iTexID)
return;
- const auto PMONITOR = g_pCompositor->getMonitorFromID(pLayer->monitorID);
+ const auto PMONITOR = pLayer->monitor.lock();
CBox layerBox;
// some mafs to figure out the correct box