summaryrefslogtreecommitdiff
path: root/src/desktop
diff options
context:
space:
mode:
authorVaxry <43317083+vaxerski@users.noreply.github.com>2024-07-21 13:09:54 +0200
committerGitHub <noreply@github.com>2024-07-21 13:09:54 +0200
commit016da234d0e852de3ef20eb2e89ac58d2a85f6e7 (patch)
tree496085987176551b0794fffc069877d44943e2f1 /src/desktop
parentf642fb97df5c69267a03452533de383ff8023570 (diff)
Core: Move to aquamarine (#6608)
Moves Hyprland from wlroots to aquamarine for the backend. --------- Signed-off-by: Vaxry <vaxry@vaxry.net> Co-authored-by: Mihai Fufezan <mihai@fufexan.net> Co-authored-by: Jan Beich <jbeich@FreeBSD.org> Co-authored-by: vaxerski <vaxerski@users.noreply.github.com> Co-authored-by: UjinT34 <41110182+UjinT34@users.noreply.github.com> Co-authored-by: Tom Englund <tomenglund26@gmail.com> Co-authored-by: Ikalco <73481042+ikalco@users.noreply.github.com> Co-authored-by: diniamo <diniamo53@gmail.com>
Diffstat (limited to 'src/desktop')
-rw-r--r--src/desktop/Popup.cpp5
-rw-r--r--src/desktop/Popup.hpp4
-rw-r--r--src/desktop/Window.cpp3
3 files changed, 7 insertions, 5 deletions
diff --git a/src/desktop/Popup.cpp b/src/desktop/Popup.cpp
index f0fd556c..131a26b5 100644
--- a/src/desktop/Popup.cpp
+++ b/src/desktop/Popup.cpp
@@ -55,7 +55,7 @@ void CPopup::initAllSignals() {
}
void CPopup::onNewPopup(SP<CXDGPopupResource> popup) {
- const auto POPUP = m_vChildren.emplace_back(std::make_unique<CPopup>(popup, this)).get();
+ const auto POPUP = m_vChildren.emplace_back(makeShared<CPopup>(popup, this)).get();
Debug::log(LOG, "New popup at {:x}", (uintptr_t)POPUP);
}
@@ -250,7 +250,8 @@ void CPopup::recheckTree() {
}
void CPopup::recheckChildrenRecursive() {
- for (auto& c : m_vChildren) {
+ auto cpy = m_vChildren;
+ for (auto& c : cpy) {
c->onCommit(true);
c->recheckChildrenRecursive();
}
diff --git a/src/desktop/Popup.hpp b/src/desktop/Popup.hpp
index 47e180a8..d045cd41 100644
--- a/src/desktop/Popup.hpp
+++ b/src/desktop/Popup.hpp
@@ -60,8 +60,8 @@ class CPopup {
bool m_bMapped = false;
//
- std::vector<std::unique_ptr<CPopup>> m_vChildren;
- std::unique_ptr<CSubsurface> m_pSubsurfaceHead;
+ std::vector<SP<CPopup>> m_vChildren;
+ std::unique_ptr<CSubsurface> m_pSubsurfaceHead;
struct {
CHyprSignalListener newPopup;
diff --git a/src/desktop/Window.cpp b/src/desktop/Window.cpp
index 4ea34156..7497957a 100644
--- a/src/desktop/Window.cpp
+++ b/src/desktop/Window.cpp
@@ -1155,7 +1155,8 @@ int CWindow::getRealBorderSize() {
}
bool CWindow::canBeTorn() {
- return m_sWindowData.tearing.valueOr(m_bTearingHint);
+ static auto PTEARING = CConfigValue<Hyprlang::INT>("general:allow_tearing");
+ return m_sWindowData.tearing.valueOr(m_bTearingHint) && *PTEARING;
}
bool CWindow::shouldSendFullscreenState() {