summaryrefslogtreecommitdiff
path: root/src/desktop
diff options
context:
space:
mode:
authorVaxry <vaxry@vaxry.net>2024-03-25 16:08:55 +0000
committerVaxry <vaxry@vaxry.net>2024-03-25 16:09:02 +0000
commitca17a89d86b73f37019c4cc0c7087303adbcc1f9 (patch)
treeedbaabbc0a73109465228f7d5270e5163c6b6ca6 /src/desktop
parent356414639fc06ace7045236ec41d673342981057 (diff)
renderer: allow blurring ls popups
Diffstat (limited to 'src/desktop')
-rw-r--r--src/desktop/Popup.cpp9
-rw-r--r--src/desktop/Window.cpp10
-rw-r--r--src/desktop/Window.hpp1
3 files changed, 20 insertions, 0 deletions
diff --git a/src/desktop/Popup.cpp b/src/desktop/Popup.cpp
index 98d5881a..77e486fd 100644
--- a/src/desktop/Popup.cpp
+++ b/src/desktop/Popup.cpp
@@ -117,6 +117,9 @@ void CPopup::onMap() {
unconstrain();
sendScale();
+
+ if (m_pLayerOwner && m_pLayerOwner->layer < ZWLR_LAYER_SHELL_V1_LAYER_TOP)
+ g_pHyprOpenGL->markBlurDirtyForMonitor(g_pCompositor->getMonitorFromID(m_pLayerOwner->layer));
}
void CPopup::onUnmap() {
@@ -131,6 +134,9 @@ void CPopup::onUnmap() {
m_pSubsurfaceHead.reset();
g_pInputManager->simulateMouseMovement();
+
+ if (m_pLayerOwner && m_pLayerOwner->layer < ZWLR_LAYER_SHELL_V1_LAYER_TOP)
+ g_pHyprOpenGL->markBlurDirtyForMonitor(g_pCompositor->getMonitorFromID(m_pLayerOwner->layer));
}
void CPopup::onCommit(bool ignoreSiblings) {
@@ -158,6 +164,9 @@ void CPopup::onCommit(bool ignoreSiblings) {
g_pHyprRenderer->damageSurface(m_sWLSurface.wlr(), COORDS.x, COORDS.y);
m_bRequestedReposition = false;
+
+ if (m_pLayerOwner && m_pLayerOwner->layer < ZWLR_LAYER_SHELL_V1_LAYER_TOP)
+ g_pHyprOpenGL->markBlurDirtyForMonitor(g_pCompositor->getMonitorFromID(m_pLayerOwner->layer));
}
void CPopup::onReposition() {
diff --git a/src/desktop/Window.cpp b/src/desktop/Window.cpp
index 3145000c..9151d57e 100644
--- a/src/desktop/Window.cpp
+++ b/src/desktop/Window.cpp
@@ -1151,3 +1151,13 @@ void CWindow::setAnimationsToMove() {
m_vRealSize.setConfig(PANIMCFG);
m_bAnimatingIn = false;
}
+
+int CWindow::popupsCount() {
+ if (m_bIsX11)
+ return 1;
+
+ int no = 0;
+ wlr_xdg_surface_for_each_popup_surface(
+ m_uSurface.xdg, [](wlr_surface* s, int x, int y, void* data) { *(int*)data += 1; }, &no);
+ return no;
+}
diff --git a/src/desktop/Window.hpp b/src/desktop/Window.hpp
index 3ec8a54c..d8b4012d 100644
--- a/src/desktop/Window.hpp
+++ b/src/desktop/Window.hpp
@@ -404,6 +404,7 @@ class CWindow {
void onBorderAngleAnimEnd(void* ptr);
bool isInCurvedCorner(double x, double y);
bool hasPopupAt(const Vector2D& pos);
+ int popupsCount();
void applyGroupRules();
void createGroup();