handle subsurfaces

This commit is contained in:
vaxerski 2022-03-21 16:13:43 +01:00
parent d06423c9d1
commit bcb02b9307
11 changed files with 215 additions and 32 deletions

View file

@ -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

View file

@ -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 {