From 8cf06594447acaf463776909d41bddcfdcc4eca2 Mon Sep 17 00:00:00 2001 From: outfoxxed Date: Sun, 10 Mar 2024 04:08:42 -0700 Subject: [PATCH] window: fix empty masks not applying --- src/core/proxywindow.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/core/proxywindow.cpp b/src/core/proxywindow.cpp index c0415a7..ce3b8c4 100644 --- a/src/core/proxywindow.cpp +++ b/src/core/proxywindow.cpp @@ -1,5 +1,6 @@ #include "proxywindow.hpp" +#include #include #include #include @@ -215,6 +216,12 @@ void ProxyWindowBase::updateMask() { auto windowRegion = QRegion(QRect(0, 0, this->width(), this->height())); mask = this->mMask->applyTo(windowRegion); } + + if (mask.isEmpty()) { + this->window->setFlag(Qt::WindowTransparentForInput, true); + } + } else { + this->window->setFlag(Qt::WindowTransparentForInput, false); } this->window->setMask(mask);