layer-shell: move to new impl

Also bumps the hw-s dep
This commit is contained in:
Vaxry 2024-05-09 21:47:21 +01:00
parent 85f7f69046
commit 635a02d83f
24 changed files with 544 additions and 235 deletions

View file

@ -3,6 +3,7 @@
#include <vector>
#include <memory>
#include "Subsurface.hpp"
#include "../helpers/signal/Listener.hpp"
class CPopup {
public:
@ -15,22 +16,27 @@ class CPopup {
~CPopup();
Vector2D coordsRelativeToParent();
Vector2D coordsGlobal();
Vector2D coordsRelativeToParent();
Vector2D coordsGlobal();
Vector2D size();
Vector2D size();
void onNewPopup(wlr_xdg_popup* popup);
void onDestroy();
void onMap();
void onUnmap();
void onCommit(bool ignoreSiblings = false);
void onReposition();
void onNewPopup(wlr_xdg_popup* popup);
void onDestroy();
void onMap();
void onUnmap();
void onCommit(bool ignoreSiblings = false);
void onReposition();
void recheckTree();
void recheckTree();
bool visible();
bool visible();
// will also loop over this node
void breadthfirst(std::function<void(CPopup*, void*)> fn, void* data);
CPopup* at(const Vector2D& globalCoords, bool allowsInput = false);
//
CWLSurface m_sWLSurface;
private:
@ -62,11 +68,16 @@ class CPopup {
DYNLISTENER(commitPopup);
DYNLISTENER(repositionPopup);
void initAllSignals();
void unconstrain();
void recheckChildrenRecursive();
void sendScale();
struct {
CHyprSignalListener newPopup;
} listeners;
Vector2D localToGlobal(const Vector2D& rel);
Vector2D t1ParentCoords();
void initAllSignals();
void unconstrain();
void recheckChildrenRecursive();
void sendScale();
Vector2D localToGlobal(const Vector2D& rel);
Vector2D t1ParentCoords();
static void bfHelper(std::vector<CPopup*> nodes, std::function<void(CPopup*, void*)> fn, void* data);
};