summaryrefslogtreecommitdiff
path: root/src/helpers
diff options
context:
space:
mode:
authorVaxry <vaxry@vaxry.net>2024-02-29 14:26:02 +0000
committerVaxry <vaxry@vaxry.net>2024-02-29 14:26:02 +0000
commit2e111c8cf97d391c25fc6263660271fab605ece1 (patch)
treed0e38817bb633457a87eabae0fa109533937199f /src/helpers
parentb39dcfa497f84486569bf862092dfcfadbfd8747 (diff)
xdg: rewrite entire popup implementation
Diffstat (limited to 'src/helpers')
-rw-r--r--src/helpers/WLClasses.hpp32
1 files changed, 4 insertions, 28 deletions
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<CWLSurface> popupSurfaces;
+
+ // desktop components
+ std::unique_ptr<CPopup> 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;