From 2e111c8cf97d391c25fc6263660271fab605ece1 Mon Sep 17 00:00:00 2001 From: Vaxry Date: Thu, 29 Feb 2024 14:26:02 +0000 Subject: xdg: rewrite entire popup implementation --- src/helpers/WLClasses.hpp | 32 ++++---------------------------- 1 file changed, 4 insertions(+), 28 deletions(-) (limited to 'src/helpers') diff --git a/src/helpers/WLClasses.hpp b/src/helpers/WLClasses.hpp index e536c3d2..624625af 100644 --- a/src/helpers/WLClasses.hpp +++ b/src/helpers/WLClasses.hpp @@ -5,6 +5,7 @@ #include "wlr-layer-shell-unstable-v1-protocol.h" #include "../Window.hpp" #include "../desktop/Subsurface.hpp" +#include "../desktop/Popup.hpp" #include "AnimatedVariable.hpp" #include "../desktop/WLSurface.hpp" #include "Region.hpp" @@ -31,13 +32,14 @@ struct SLayerSurface { bool keyboardExclusive = false; CWLSurface surface; - std::list popupSurfaces; + + // desktop components + std::unique_ptr popupHead; DYNLISTENER(destroyLayerSurface); DYNLISTENER(mapLayerSurface); DYNLISTENER(unmapLayerSurface); DYNLISTENER(commitLayerSurface); - DYNLISTENER(newPopup); CBox geometry = {0, 0, 0, 0}; Vector2D position; @@ -199,32 +201,6 @@ struct SConstraint { class CMonitor; -struct SXDGPopup { - CWindow* parentWindow = nullptr; - SLayerSurface* parentLS = nullptr; - SXDGPopup* parentPopup = nullptr; - wlr_xdg_popup* popup = nullptr; - CMonitor* monitor = nullptr; - - DYNLISTENER(newPopupFromPopupXDG); - DYNLISTENER(destroyPopupXDG); - DYNLISTENER(mapPopupXDG); - DYNLISTENER(unmapPopupXDG); - DYNLISTENER(commitPopupXDG); - DYNLISTENER(repositionPopupXDG); - - double lx; - double ly; - - Vector2D lastPos = {}; - bool repositionRequested = false; - - // For the list lookup - bool operator==(const SXDGPopup& rhs) const { - return popup == rhs.popup; - } -}; - struct SSeat { wlr_seat* seat = nullptr; wl_client* exclusiveClient = nullptr; -- cgit v1.2.3