mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-08-06 15:11:57 -07:00
Core: Move to aquamarine (#6608)
Moves Hyprland from wlroots to aquamarine for the backend. --------- Signed-off-by: Vaxry <vaxry@vaxry.net> Co-authored-by: Mihai Fufezan <mihai@fufexan.net> Co-authored-by: Jan Beich <jbeich@FreeBSD.org> Co-authored-by: vaxerski <vaxerski@users.noreply.github.com> Co-authored-by: UjinT34 <41110182+UjinT34@users.noreply.github.com> Co-authored-by: Tom Englund <tomenglund26@gmail.com> Co-authored-by: Ikalco <73481042+ikalco@users.noreply.github.com> Co-authored-by: diniamo <diniamo53@gmail.com>
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
#include "ProtocolManager.hpp"
|
||||
|
||||
#include "../config/ConfigValue.hpp"
|
||||
|
||||
#include "../protocols/TearingControl.hpp"
|
||||
#include "../protocols/FractionalScale.hpp"
|
||||
#include "../protocols/XDGOutput.hpp"
|
||||
@@ -35,6 +37,8 @@
|
||||
#include "../protocols/Viewporter.hpp"
|
||||
#include "../protocols/MesaDRM.hpp"
|
||||
#include "../protocols/LinuxDMABUF.hpp"
|
||||
#include "../protocols/DRMLease.hpp"
|
||||
#include "../protocols/DRMSyncobj.hpp"
|
||||
|
||||
#include "../protocols/core/Seat.hpp"
|
||||
#include "../protocols/core/DataDevice.hpp"
|
||||
@@ -45,6 +49,10 @@
|
||||
|
||||
#include "../helpers/Monitor.hpp"
|
||||
#include "../render/Renderer.hpp"
|
||||
#include "../Compositor.hpp"
|
||||
|
||||
#include <aquamarine/buffer/Buffer.hpp>
|
||||
#include <aquamarine/backend/Backend.hpp>
|
||||
|
||||
void CProtocolManager::onMonitorModeChange(CMonitor* pMonitor) {
|
||||
const bool ISMIRROR = pMonitor->isMirror();
|
||||
@@ -65,6 +73,8 @@ void CProtocolManager::onMonitorModeChange(CMonitor* pMonitor) {
|
||||
|
||||
CProtocolManager::CProtocolManager() {
|
||||
|
||||
static const auto PENABLEEXPLICIT = CConfigValue<Hyprlang::INT>("experimental:explicit_sync");
|
||||
|
||||
// Outputs are a bit dumb, we have to agree.
|
||||
static auto P = g_pHookSystem->hookDynamic("monitorAdded", [this](void* self, SCallbackInfo& info, std::any param) {
|
||||
auto M = std::any_cast<CMonitor*>(param);
|
||||
@@ -131,6 +141,16 @@ CProtocolManager::CProtocolManager() {
|
||||
PROTO::primarySelection = std::make_unique<CPrimarySelectionProtocol>(&zwp_primary_selection_device_manager_v1_interface, 1, "PrimarySelection");
|
||||
PROTO::xwaylandShell = std::make_unique<CXWaylandShellProtocol>(&xwayland_shell_v1_interface, 1, "XWaylandShell");
|
||||
|
||||
for (auto& b : g_pCompositor->m_pAqBackend->getImplementations()) {
|
||||
if (b->type() != Aquamarine::AQ_BACKEND_DRM)
|
||||
continue;
|
||||
|
||||
PROTO::lease = std::make_unique<CDRMLeaseProtocol>(&wp_drm_lease_device_v1_interface, 1, "DRMLease");
|
||||
if (*PENABLEEXPLICIT)
|
||||
PROTO::sync = std::make_unique<CDRMSyncobjProtocol>(&wp_linux_drm_syncobj_manager_v1_interface, 1, "DRMSyncobj");
|
||||
break;
|
||||
}
|
||||
|
||||
if (g_pHyprOpenGL->getDRMFormats().size() > 0) {
|
||||
PROTO::mesaDRM = std::make_unique<CMesaDRMProtocol>(&wl_drm_interface, 2, "MesaDRM");
|
||||
PROTO::linuxDma = std::make_unique<CLinuxDMABufV1Protocol>(&zwp_linux_dmabuf_v1_interface, 5, "LinuxDMABUF");
|
||||
|
Reference in New Issue
Block a user