aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorvaxerski <[email protected]>2023-10-04 13:39:40 +0100
committervaxerski <[email protected]>2023-10-04 13:39:40 +0100
commit4531717f3ee58f6093f62e5afb21da6599b5a813 (patch)
treec78d62136ce4bd2b09ae1e50d4264317bb3791aa
parentf8c18ff7977cf034572cbabe161381465bc2b1ae (diff)
downloadHyprland-4531717f3ee58f6093f62e5afb21da6599b5a813.tar.gz
Hyprland-4531717f3ee58f6093f62e5afb21da6599b5a813.zip
renderer: considerable fixes to repaint logic
-rw-r--r--src/events/Monitors.cpp3
-rw-r--r--src/helpers/SubsurfaceTree.cpp3
2 files changed, 4 insertions, 2 deletions
diff --git a/src/events/Monitors.cpp b/src/events/Monitors.cpp
index 0b90ba1e..82577dae 100644
--- a/src/events/Monitors.cpp
+++ b/src/events/Monitors.cpp
@@ -156,7 +156,8 @@ void Events::listener_monitorFrame(void* owner, void* data) {
if (!PMONITOR->tearingState.frameScheduledWhileBusy)
return; // we did not schedule a frame yet to be displayed, but we are tearing. Why render?
- PMONITOR->tearingState.nextRenderTorn = true;
+ PMONITOR->tearingState.nextRenderTorn = true;
+ PMONITOR->tearingState.frameScheduledWhileBusy = false;
}
static auto* const PENABLERAT = &g_pConfigManager->getConfigValuePtr("misc:render_ahead_of_time")->intValue;
diff --git a/src/helpers/SubsurfaceTree.cpp b/src/helpers/SubsurfaceTree.cpp
index 76a392e8..b0ed0bfa 100644
--- a/src/helpers/SubsurfaceTree.cpp
+++ b/src/helpers/SubsurfaceTree.cpp
@@ -249,7 +249,8 @@ void Events::listener_commitSubsurface(void* owner, void* data) {
if (pNode->pWindowOwner) {
// tearing: if solitary, redraw it. This still might be a single surface window
const auto PMONITOR = g_pCompositor->getMonitorFromID(pNode->pWindowOwner->m_iMonitorID);
- if (PMONITOR->solitaryClient == pNode->pWindowOwner && pNode->pWindowOwner->canBeTorn() && PMONITOR->tearingState.canTear) {
+ if (PMONITOR->solitaryClient == pNode->pWindowOwner && pNode->pWindowOwner->canBeTorn() && PMONITOR->tearingState.canTear &&
+ pNode->pSurface->wlr()->current.committed & WLR_SURFACE_STATE_BUFFER) {
CRegion damageBox;
wlr_surface_get_effective_damage(pNode->pSurface->wlr(), damageBox.pixman());