diff options
| author | Vaxry <43317083+vaxerski@users.noreply.github.com> | 2023-03-20 15:00:58 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-03-20 15:00:58 +0000 |
| commit | 788a8f7c134a34085d683e44a328e344be6b21f3 (patch) | |
| tree | bed90c82b3c3e65722b5f1f97a6d04240ad3c7fc /src/Window.cpp | |
| parent | d23bbd1687a5413fb7f2c08b67692d4e64f8efef (diff) | |
internal: wrap wlr surfaces (#1822)
Diffstat (limited to 'src/Window.cpp')
| -rw-r--r-- | src/Window.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/Window.cpp b/src/Window.cpp index afa9ba7d..19fb68c2 100644 --- a/src/Window.cpp +++ b/src/Window.cpp @@ -265,9 +265,9 @@ void CWindow::updateSurfaceOutputs() { const auto PNEWMONITOR = g_pCompositor->getMonitorFromID(m_iMonitorID); if (PLASTMONITOR && PLASTMONITOR->m_bEnabled) - wlr_surface_for_each_surface(g_pXWaylandManager->getWindowSurface(this), sendLeaveIter, PLASTMONITOR->output); + wlr_surface_for_each_surface(m_pWLSurface.wlr(), sendLeaveIter, PLASTMONITOR->output); - wlr_surface_for_each_surface(g_pXWaylandManager->getWindowSurface(this), sendEnterIter, PNEWMONITOR->output); + wlr_surface_for_each_surface(m_pWLSurface.wlr(), sendEnterIter, PNEWMONITOR->output); } void CWindow::moveToWorkspace(int workspaceID) { @@ -285,7 +285,7 @@ void CWindow::moveToWorkspace(int workspaceID) { } if (PMONITOR) - g_pProtocolManager->m_pFractionalScaleProtocolManager->setPreferredScaleForSurface(g_pXWaylandManager->getWindowSurface(this), PMONITOR->scale); + g_pProtocolManager->m_pFractionalScaleProtocolManager->setPreferredScaleForSurface(m_pWLSurface.wlr(), PMONITOR->scale); } CWindow* CWindow::X11TransientFor() { @@ -340,6 +340,8 @@ void CWindow::onUnmap() { void CWindow::onMap() { + m_pWLSurface.assign(g_pXWaylandManager->getWindowSurface(this)); + // JIC, reset the callbacks. If any are set, we'll make sure they are cleared so we don't accidentally unset them. (In case a window got remapped) m_vRealPosition.resetAllCallbacks(); m_vRealSize.resetAllCallbacks(); |
