summaryrefslogtreecommitdiff
path: root/src/helpers
diff options
context:
space:
mode:
authorvaxerski <43317083+vaxerski@users.noreply.github.com>2022-03-21 16:13:43 +0100
committervaxerski <43317083+vaxerski@users.noreply.github.com>2022-03-21 16:13:43 +0100
commitbcb02b9307d09918a11fa377065d7f2c6e506754 (patch)
tree83d2c280a30fdfa2da5c7d999de093615d2b6fcb /src/helpers
parentd06423c9d1fcf908a485b8654d13dd1b154613a4 (diff)
handle subsurfaces
Diffstat (limited to 'src/helpers')
-rw-r--r--src/helpers/Monitor.hpp1
-rw-r--r--src/helpers/WLClasses.hpp25
2 files changed, 24 insertions, 2 deletions
diff --git a/src/helpers/Monitor.hpp b/src/helpers/Monitor.hpp
index 0977b1f8..b3f10893 100644
--- a/src/helpers/Monitor.hpp
+++ b/src/helpers/Monitor.hpp
@@ -23,6 +23,7 @@ struct SMonitor {
// WLR stuff
wlr_output* output = nullptr;
float refreshRate = 60;
+ wlr_output_damage* damage = nullptr;
// Double-linked list because we need to have constant mem addresses for signals
// We have to store pointers and use raw new/delete because they might be moved between them
diff --git a/src/helpers/WLClasses.hpp b/src/helpers/WLClasses.hpp
index 8d7dcede..c37bf5a5 100644
--- a/src/helpers/WLClasses.hpp
+++ b/src/helpers/WLClasses.hpp
@@ -14,6 +14,7 @@ struct SLayerSurface {
DYNLISTENER(unmapLayerSurface);
DYNLISTENER(commitLayerSurface);
DYNLISTENER(newPopup);
+ DYNLISTENER(newSubsurface);
wlr_box geometry;
zwlr_layer_shell_v1_layer layer;
@@ -27,11 +28,31 @@ 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;
- int x;
- int y;
+ int x, y;
+
+ // for iters
+ void* data = nullptr;
+ wlr_surface* surface = nullptr;
+ int w, h;
};
struct SKeyboard {