summaryrefslogtreecommitdiff
path: root/src/helpers/WLClasses.hpp
diff options
context:
space:
mode:
authorvaxerski <43317083+vaxerski@users.noreply.github.com>2022-03-27 17:25:20 +0200
committervaxerski <43317083+vaxerski@users.noreply.github.com>2022-03-27 17:25:20 +0200
commitad36a9dc9ed032e6e34c06f78995bca0045f85b0 (patch)
tree933cfc71255a9cfbe1211f187d7d101a4e30ffc8 /src/helpers/WLClasses.hpp
parent4c3b9ae207967bf06b973cc6b49db58887f1af6b (diff)
rework popups completely
Diffstat (limited to 'src/helpers/WLClasses.hpp')
-rw-r--r--src/helpers/WLClasses.hpp43
1 files changed, 8 insertions, 35 deletions
diff --git a/src/helpers/WLClasses.hpp b/src/helpers/WLClasses.hpp
index 791e69f2..985e62af 100644
--- a/src/helpers/WLClasses.hpp
+++ b/src/helpers/WLClasses.hpp
@@ -4,6 +4,7 @@
#include "../defines.hpp"
#include "../../wlr-layer-shell-unstable-v1-protocol.h"
#include "../Window.hpp"
+#include "SubsurfaceTree.hpp"
struct SLayerSurface {
wlr_layer_surface_v1* layerSurface;
@@ -14,9 +15,9 @@ struct SLayerSurface {
DYNLISTENER(unmapLayerSurface);
DYNLISTENER(commitLayerSurface);
DYNLISTENER(newPopup);
- DYNLISTENER(newSubsurface);
wlr_box geometry;
+ Vector2D position;
zwlr_layer_shell_v1_layer layer;
int monitorID = -1;
@@ -28,22 +29,6 @@ struct SLayerSurface {
}
};
-struct SSubsurface {
- wlr_subsurface* subsurface = nullptr;
- SLayerSurface* pParentSurface = nullptr;
-
- DYNLISTENER(mapSubsurface);
- DYNLISTENER(unmapSubsurface);
- DYNLISTENER(destroySubsurface);
- DYNLISTENER(commitSubsurface);
- DYNLISTENER(newSubsurface);
-
- // For the list lookup
- bool operator==(const SSubsurface& rhs) {
- return subsurface == rhs.subsurface && pParentSurface == rhs.pParentSurface;
- }
-};
-
struct SRenderData {
wlr_output* output;
timespec* when;
@@ -68,26 +53,9 @@ struct SKeyboard {
}
};
-struct SLayerPopup {
- wlr_xdg_popup* popup = nullptr;
- SLayerSurface* parentSurface = nullptr;
- wlr_xdg_popup* parentPopup = nullptr;
-
- DYNLISTENER(mapPopup);
- DYNLISTENER(destroyPopup);
- DYNLISTENER(unmapPopup);
- DYNLISTENER(commitPopup);
- DYNLISTENER(newPopupFromPopup);
-
- // For the list lookup
- bool operator==(const SLayerPopup& rhs) {
- return popup == rhs.popup;
- }
-};
-
struct SXDGPopup {
CWindow* parentWindow = nullptr;
- wlr_xdg_popup* parentPopup = nullptr;
+ SXDGPopup* parentPopup = nullptr;
wlr_xdg_popup* popup = nullptr;
DYNLISTENER(newPopupFromPopupXDG);
@@ -95,6 +63,11 @@ struct SXDGPopup {
DYNLISTENER(mapPopupXDG);
DYNLISTENER(unmapPopupXDG);
+ double* lx;
+ double* ly;
+
+ SSurfaceTreeNode* pSurfaceTree = nullptr;
+
// For the list lookup
bool operator==(const SXDGPopup& rhs) {
return popup == rhs.popup;