summaryrefslogtreecommitdiff
path: root/src/Window.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Window.cpp')
-rw-r--r--src/Window.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/Window.cpp b/src/Window.cpp
index 01b58253..73835ccd 100644
--- a/src/Window.cpp
+++ b/src/Window.cpp
@@ -318,7 +318,7 @@ void CWindow::destroyToplevelHandle() {
}
void CWindow::updateToplevel() {
- updateSurfaceOutputs();
+ updateSurfaceScaleTransformDetails();
if (!m_phForeignToplevel)
return;
@@ -345,8 +345,8 @@ void sendLeaveIter(wlr_surface* pSurface, int x, int y, void* data) {
wlr_surface_send_leave(pSurface, OUTPUT);
}
-void CWindow::updateSurfaceOutputs() {
- if (m_iLastSurfaceMonitorID == m_iMonitorID || !m_bIsMapped || m_bHidden)
+void CWindow::updateSurfaceScaleTransformDetails() {
+ if (!m_bIsMapped || m_bHidden)
return;
const auto PLASTMONITOR = g_pCompositor->getMonitorFromID(m_iLastSurfaceMonitorID);
@@ -355,10 +355,12 @@ void CWindow::updateSurfaceOutputs() {
const auto PNEWMONITOR = g_pCompositor->getMonitorFromID(m_iMonitorID);
- if (PLASTMONITOR && PLASTMONITOR->m_bEnabled)
- wlr_surface_for_each_surface(m_pWLSurface.wlr(), sendLeaveIter, PLASTMONITOR->output);
+ if (PNEWMONITOR != PLASTMONITOR) {
+ if (PLASTMONITOR && PLASTMONITOR->m_bEnabled)
+ wlr_surface_for_each_surface(m_pWLSurface.wlr(), sendLeaveIter, PLASTMONITOR->output);
- wlr_surface_for_each_surface(m_pWLSurface.wlr(), sendEnterIter, PNEWMONITOR->output);
+ wlr_surface_for_each_surface(m_pWLSurface.wlr(), sendEnterIter, PNEWMONITOR->output);
+ }
wlr_surface_for_each_surface(
m_pWLSurface.wlr(),