aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Compositor.hpp
diff options
context:
space:
mode:
authorVaxry <[email protected]>2024-07-21 13:09:54 +0200
committerGitHub <[email protected]>2024-07-21 13:09:54 +0200
commit016da234d0e852de3ef20eb2e89ac58d2a85f6e7 (patch)
tree496085987176551b0794fffc069877d44943e2f1 /src/Compositor.hpp
parentf642fb97df5c69267a03452533de383ff8023570 (diff)
downloadHyprland-016da234d0e852de3ef20eb2e89ac58d2a85f6e7.tar.gz
Hyprland-016da234d0e852de3ef20eb2e89ac58d2a85f6e7.zip
Core: Move to aquamarine (#6608)
Moves Hyprland from wlroots to aquamarine for the backend. --------- Signed-off-by: Vaxry <[email protected]> Co-authored-by: Mihai Fufezan <[email protected]> Co-authored-by: Jan Beich <[email protected]> Co-authored-by: vaxerski <[email protected]> Co-authored-by: UjinT34 <[email protected]> Co-authored-by: Tom Englund <[email protected]> Co-authored-by: Ikalco <[email protected]> Co-authored-by: diniamo <[email protected]>
Diffstat (limited to 'src/Compositor.hpp')
-rw-r--r--src/Compositor.hpp36
1 files changed, 14 insertions, 22 deletions
diff --git a/src/Compositor.hpp b/src/Compositor.hpp
index 4aec323f..58c5b33d 100644
--- a/src/Compositor.hpp
+++ b/src/Compositor.hpp
@@ -30,6 +30,9 @@
#include "plugins/PluginSystem.hpp"
#include "helpers/Watchdog.hpp"
+#include <aquamarine/backend/Backend.hpp>
+#include <aquamarine/output/Output.hpp>
+
class CWLSurfaceResource;
enum eManagersInitStage {
@@ -43,22 +46,11 @@ class CCompositor {
CCompositor();
~CCompositor();
- // ------------------ WLR BASICS ------------------ //
- wl_display* m_sWLDisplay;
- wl_event_loop* m_sWLEventLoop;
- wlr_backend* m_sWLRBackend;
- wlr_session* m_sWLRSession;
- wlr_renderer* m_sWLRRenderer;
- wlr_allocator* m_sWLRAllocator;
- wlr_compositor* m_sWLRCompositor;
- wlr_subcompositor* m_sWLRSubCompositor;
- wlr_drm* m_sWRLDRM;
- wlr_drm_lease_v1_manager* m_sWRLDRMLeaseMgr;
- wlr_egl* m_sWLREGL;
- int m_iDRMFD;
- wlr_linux_dmabuf_v1* m_sWLRLinuxDMABuf;
- wlr_backend* m_sWLRHeadlessBackend;
- // ------------------------------------------------- //
+ wl_display* m_sWLDisplay;
+ wl_event_loop* m_sWLEventLoop;
+ int m_iDRMFD = -1;
+ bool m_bInitialized = false;
+ SP<Aquamarine::CBackend> m_pAqBackend;
std::string m_szHyprTempDataRoot = "";
@@ -94,10 +86,9 @@ class CCompositor {
bool m_bReadyToProcess = false;
bool m_bSessionActive = true;
bool m_bDPMSStateON = true;
- bool m_bUnsafeState = false; // unsafe state is when there is no monitors.
- bool m_bNextIsUnsafe = false; // because wlroots
+ bool m_bUnsafeState = false; // unsafe state is when there is no monitors.
+ bool m_bNextIsUnsafe = false;
CMonitor* m_pUnsafeOutput = nullptr; // fallback output for the unsafe state
- bool m_bExitTriggered = false; // For exit dispatcher
bool m_bIsShuttingDown = false;
// ------------------------------------------------- //
@@ -116,8 +107,8 @@ class CCompositor {
SP<CWLSurfaceResource> vectorToLayerPopupSurface(const Vector2D&, CMonitor* monitor, Vector2D*, PHLLS*);
SP<CWLSurfaceResource> vectorWindowToSurface(const Vector2D&, PHLWINDOW, Vector2D& sl);
Vector2D vectorToSurfaceLocal(const Vector2D&, PHLWINDOW, SP<CWLSurfaceResource>);
- CMonitor* getMonitorFromOutput(wlr_output*);
- CMonitor* getRealMonitorFromOutput(wlr_output*);
+ CMonitor* getMonitorFromOutput(SP<Aquamarine::IOutput>);
+ CMonitor* getRealMonitorFromOutput(SP<Aquamarine::IOutput>);
PHLWINDOW getWindowFromSurface(SP<CWLSurfaceResource>);
PHLWINDOW getWindowFromHandle(uint32_t);
bool isWorkspaceVisible(PHLWORKSPACE);
@@ -157,7 +148,7 @@ class CCompositor {
void setWindowFullscreen(PHLWINDOW, bool, eFullscreenMode mode = FULLSCREEN_INVALID);
void updateFullscreenFadeOnWorkspace(PHLWORKSPACE);
PHLWINDOW getX11Parent(PHLWINDOW);
- void scheduleFrameForMonitor(CMonitor*);
+ void scheduleFrameForMonitor(CMonitor*, Aquamarine::IOutput::scheduleFrameReason reason = Aquamarine::IOutput::AQ_SCHEDULE_CLIENT_UNKNOWN);
void addToFadingOutSafe(PHLLS);
void removeFromFadingOutSafe(PHLLS);
void addToFadingOutSafe(PHLWINDOW);
@@ -182,6 +173,7 @@ class CCompositor {
void setPreferredTransformForSurface(SP<CWLSurfaceResource> pSurface, wl_output_transform transform);
void updateSuspendedStates();
PHLWINDOW windowForCPointer(CWindow*);
+ void onNewMonitor(SP<Aquamarine::IOutput> output);
std::string explicitConfigPath;