mirror of
https://github.com/hyprwm/Hyprland
synced 2024-12-25 08:09:51 +01:00
stuf
This commit is contained in:
parent
78498c8987
commit
ff7fbfcd09
4 changed files with 11 additions and 1 deletions
|
@ -553,6 +553,8 @@ CConfigManager::CConfigManager() {
|
||||||
m_pConfig->addConfigValue("group:groupbar:col.inactive", Hyprlang::CConfigCustomValueType{&configHandleGradientSet, configHandleGradientDestroy, "0x66777700"});
|
m_pConfig->addConfigValue("group:groupbar:col.inactive", Hyprlang::CConfigCustomValueType{&configHandleGradientSet, configHandleGradientDestroy, "0x66777700"});
|
||||||
m_pConfig->addConfigValue("group:groupbar:col.locked_active", Hyprlang::CConfigCustomValueType{&configHandleGradientSet, configHandleGradientDestroy, "0x66ff5500"});
|
m_pConfig->addConfigValue("group:groupbar:col.locked_active", Hyprlang::CConfigCustomValueType{&configHandleGradientSet, configHandleGradientDestroy, "0x66ff5500"});
|
||||||
m_pConfig->addConfigValue("group:groupbar:col.locked_inactive", Hyprlang::CConfigCustomValueType{&configHandleGradientSet, configHandleGradientDestroy, "0x66775500"});
|
m_pConfig->addConfigValue("group:groupbar:col.locked_inactive", Hyprlang::CConfigCustomValueType{&configHandleGradientSet, configHandleGradientDestroy, "0x66775500"});
|
||||||
|
|
||||||
|
m_pConfig->addConfigValue("experimental:explicit_sync", Hyprlang::INT{0});
|
||||||
|
|
||||||
// devices
|
// devices
|
||||||
m_pConfig->addSpecialCategory("device", {"name"});
|
m_pConfig->addSpecialCategory("device", {"name"});
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
#include "ProtocolManager.hpp"
|
#include "ProtocolManager.hpp"
|
||||||
|
|
||||||
|
#include "../config/ConfigValue.hpp"
|
||||||
|
|
||||||
#include "../protocols/TearingControl.hpp"
|
#include "../protocols/TearingControl.hpp"
|
||||||
#include "../protocols/FractionalScale.hpp"
|
#include "../protocols/FractionalScale.hpp"
|
||||||
#include "../protocols/XDGOutput.hpp"
|
#include "../protocols/XDGOutput.hpp"
|
||||||
|
@ -67,6 +69,8 @@ void CProtocolManager::onMonitorModeChange(CMonitor* pMonitor) {
|
||||||
|
|
||||||
CProtocolManager::CProtocolManager() {
|
CProtocolManager::CProtocolManager() {
|
||||||
|
|
||||||
|
static const auto PENABLEEXPLICIT = CConfigValue<Hyprlang::INT>("experimental:explicit_sync");
|
||||||
|
|
||||||
// Outputs are a bit dumb, we have to agree.
|
// Outputs are a bit dumb, we have to agree.
|
||||||
static auto P = g_pHookSystem->hookDynamic("monitorAdded", [this](void* self, SCallbackInfo& info, std::any param) {
|
static auto P = g_pHookSystem->hookDynamic("monitorAdded", [this](void* self, SCallbackInfo& info, std::any param) {
|
||||||
auto M = std::any_cast<CMonitor*>(param);
|
auto M = std::any_cast<CMonitor*>(param);
|
||||||
|
@ -132,13 +136,14 @@ CProtocolManager::CProtocolManager() {
|
||||||
PROTO::dataWlr = std::make_unique<CDataDeviceWLRProtocol>(&zwlr_data_control_manager_v1_interface, 2, "DataDeviceWlr");
|
PROTO::dataWlr = std::make_unique<CDataDeviceWLRProtocol>(&zwlr_data_control_manager_v1_interface, 2, "DataDeviceWlr");
|
||||||
PROTO::primarySelection = std::make_unique<CPrimarySelectionProtocol>(&zwp_primary_selection_device_manager_v1_interface, 1, "PrimarySelection");
|
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");
|
PROTO::xwaylandShell = std::make_unique<CXWaylandShellProtocol>(&xwayland_shell_v1_interface, 1, "XWaylandShell");
|
||||||
PROTO::sync = std::make_unique<CDRMSyncobjProtocol>(&wp_linux_drm_syncobj_manager_v1_interface, 1, "DRMSyncobj");
|
|
||||||
|
|
||||||
for (auto& b : g_pCompositor->m_pAqBackend->getImplementations()) {
|
for (auto& b : g_pCompositor->m_pAqBackend->getImplementations()) {
|
||||||
if (b->type() != Aquamarine::AQ_BACKEND_DRM)
|
if (b->type() != Aquamarine::AQ_BACKEND_DRM)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
PROTO::lease = std::make_unique<CDRMLeaseProtocol>(&wp_drm_lease_device_v1_interface, 1, "DRMLease");
|
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;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -59,6 +59,7 @@ CDRMSyncobjSurfaceResource::CDRMSyncobjSurfaceResource(SP<CWpLinuxDrmSyncobjSurf
|
||||||
// wait for the acquire timeline to materialize
|
// wait for the acquire timeline to materialize
|
||||||
auto materialized = acquireTimeline->timeline->check(acquirePoint, DRM_SYNCOBJ_WAIT_FLAGS_WAIT_AVAILABLE);
|
auto materialized = acquireTimeline->timeline->check(acquirePoint, DRM_SYNCOBJ_WAIT_FLAGS_WAIT_AVAILABLE);
|
||||||
if (!materialized.has_value()) {
|
if (!materialized.has_value()) {
|
||||||
|
LOGM(ERR, "Failed to check the acquire timeline");
|
||||||
resource->noMemory();
|
resource->noMemory();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1433,6 +1433,8 @@ void CHyprRenderer::renderMonitor(CMonitor* pMonitor) {
|
||||||
pMonitor->output->state->setExplicitInFence(pMonitor->inTimeline->exportAsSyncFileFD(pMonitor->lastWaitPoint));
|
pMonitor->output->state->setExplicitInFence(pMonitor->inTimeline->exportAsSyncFileFD(pMonitor->lastWaitPoint));
|
||||||
|
|
||||||
for (auto& e : explicitPresented) {
|
for (auto& e : explicitPresented) {
|
||||||
|
if (!e->syncobj || !e->syncobj->releaseTimeline)
|
||||||
|
continue;
|
||||||
e->syncobj->releaseTimeline->timeline->transfer(pMonitor->outTimeline, pMonitor->commitSeq, e->syncobj->releasePoint);
|
e->syncobj->releaseTimeline->timeline->transfer(pMonitor->outTimeline, pMonitor->commitSeq, e->syncobj->releasePoint);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue