summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorvaxerski <vaxry@vaxry.net>2024-02-14 11:09:18 +0000
committervaxerski <vaxry@vaxry.net>2024-02-14 11:09:18 +0000
commit2a002f31e4077ff6dd20a7116e372712e3b4e7f8 (patch)
tree4d5981f932edb23b78245fa5997c78216bbba23e /src
parent2a3429d4cfdc01794b9d6fc1b49be1da019b5606 (diff)
renderer: don't set solitary on present notifications
fixes #4647
Diffstat (limited to 'src')
-rw-r--r--src/debug/HyprNotificationOverlay.cpp4
-rw-r--r--src/debug/HyprNotificationOverlay.hpp1
-rw-r--r--src/render/Renderer.cpp3
3 files changed, 8 insertions, 0 deletions
diff --git a/src/debug/HyprNotificationOverlay.cpp b/src/debug/HyprNotificationOverlay.cpp
index 12f7a575..2968134b 100644
--- a/src/debug/HyprNotificationOverlay.cpp
+++ b/src/debug/HyprNotificationOverlay.cpp
@@ -226,4 +226,8 @@ void CHyprNotificationOverlay::draw(CMonitor* pMonitor) {
CBox pMonBox = {0, 0, pMonitor->vecPixelSize.x, pMonitor->vecPixelSize.y};
g_pHyprOpenGL->renderTexture(m_tTexture, &pMonBox, 1.f);
+}
+
+bool CHyprNotificationOverlay::hasAny() {
+ return !m_dNotifications.empty();
} \ No newline at end of file
diff --git a/src/debug/HyprNotificationOverlay.hpp b/src/debug/HyprNotificationOverlay.hpp
index 84e61f80..7a883f15 100644
--- a/src/debug/HyprNotificationOverlay.hpp
+++ b/src/debug/HyprNotificationOverlay.hpp
@@ -41,6 +41,7 @@ class CHyprNotificationOverlay {
void draw(CMonitor* pMonitor);
void addNotification(const std::string& text, const CColor& color, const float timeMs, const eIcons icon = ICON_NONE);
+ bool hasAny();
private:
CBox drawNotifications(CMonitor* pMonitor);
diff --git a/src/render/Renderer.cpp b/src/render/Renderer.cpp
index 6c660c0f..65477b31 100644
--- a/src/render/Renderer.cpp
+++ b/src/render/Renderer.cpp
@@ -2355,6 +2355,9 @@ bool CHyprRenderer::canSkipBackBufferClear(CMonitor* pMonitor) {
void CHyprRenderer::recheckSolitaryForMonitor(CMonitor* pMonitor) {
pMonitor->solitaryClient = nullptr; // reset it, if we find one it will be set.
+ if (g_pHyprNotificationOverlay->hasAny())
+ return;
+
const auto PWORKSPACE = g_pCompositor->getWorkspaceByID(pMonitor->activeWorkspace);
if (!PWORKSPACE || !PWORKSPACE->m_bHasFullscreenWindow || g_pInputManager->m_sDrag.drag || g_pCompositor->m_sSeat.exclusiveClient || pMonitor->specialWorkspaceID ||