wayland/core: move to new impl (#6268)
* wayland/core/dmabuf: move to new impl it's the final countdown
This commit is contained in:
parent
c31d9ef417
commit
6967a31450
147 changed files with 5388 additions and 2226 deletions
|
|
@ -5,23 +5,28 @@
|
|||
#include <unordered_map>
|
||||
#include "WaylandProtocol.hpp"
|
||||
#include "alpha-modifier-v1.hpp"
|
||||
#include "../helpers/signal/Listener.hpp"
|
||||
|
||||
class CWLSurfaceResource;
|
||||
|
||||
class CAlphaModifier {
|
||||
public:
|
||||
CAlphaModifier(SP<CWpAlphaModifierSurfaceV1> resource_, wlr_surface* surface);
|
||||
CAlphaModifier(SP<CWpAlphaModifierSurfaceV1> resource_, SP<CWLSurfaceResource> surface);
|
||||
~CAlphaModifier();
|
||||
|
||||
bool good();
|
||||
wlr_surface* getSurface();
|
||||
void onSurfaceDestroy();
|
||||
bool good();
|
||||
SP<CWLSurfaceResource> getSurface();
|
||||
void onSurfaceDestroy();
|
||||
|
||||
private:
|
||||
SP<CWpAlphaModifierSurfaceV1> resource;
|
||||
wlr_surface* pSurface = nullptr;
|
||||
WP<CWLSurfaceResource> pSurface;
|
||||
|
||||
void setSurfaceAlpha(float a);
|
||||
|
||||
DYNLISTENER(surfaceDestroy);
|
||||
struct {
|
||||
CHyprSignalListener destroySurface;
|
||||
} listeners;
|
||||
};
|
||||
|
||||
class CAlphaModifierProtocol : public IWaylandProtocol {
|
||||
|
|
@ -33,15 +38,15 @@ class CAlphaModifierProtocol : public IWaylandProtocol {
|
|||
private:
|
||||
void onManagerResourceDestroy(wl_resource* res);
|
||||
void destroyModifier(CAlphaModifier* decoration);
|
||||
void onGetSurface(CWpAlphaModifierV1* pMgr, uint32_t id, wlr_surface* surface);
|
||||
void onGetSurface(CWpAlphaModifierV1* pMgr, uint32_t id, SP<CWLSurfaceResource> surface);
|
||||
|
||||
//
|
||||
std::vector<UP<CWpAlphaModifierV1>> m_vManagers;
|
||||
std::unordered_map<wlr_surface*, UP<CAlphaModifier>> m_mAlphaModifiers; // xdg_toplevel -> deco
|
||||
std::vector<UP<CWpAlphaModifierV1>> m_vManagers;
|
||||
std::unordered_map<WP<CWLSurfaceResource>, UP<CAlphaModifier>> m_mAlphaModifiers; // xdg_toplevel -> deco
|
||||
|
||||
friend class CAlphaModifier;
|
||||
};
|
||||
|
||||
namespace PROTO {
|
||||
inline UP<CAlphaModifierProtocol> alphaModifier;
|
||||
};
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue