diff options
| author | Vaxry <vaxry@vaxry.net> | 2024-05-03 17:58:40 +0100 |
|---|---|---|
| committer | Vaxry <vaxry@vaxry.net> | 2024-05-03 18:08:04 +0100 |
| commit | 8a2269272b6a9752cd48097e19c0bc0f3bdab191 (patch) | |
| tree | e5381ccec7c7c09f946debc0ce5445cdca7a6fad /src/events | |
| parent | d5bf15387ad3b4ee36cae7a3cd9f4a9c28790f2e (diff) | |
output-management: move to new impl
Diffstat (limited to 'src/events')
| -rw-r--r-- | src/events/Events.hpp | 4 | ||||
| -rw-r--r-- | src/events/Misc.cpp | 10 | ||||
| -rw-r--r-- | src/events/Monitors.cpp | 44 |
3 files changed, 0 insertions, 58 deletions
diff --git a/src/events/Events.hpp b/src/events/Events.hpp index c7e98e65..5fa93c49 100644 --- a/src/events/Events.hpp +++ b/src/events/Events.hpp @@ -65,10 +65,6 @@ namespace Events { LISTENER(requestSetSel); LISTENER(requestSetPrimarySel); - // outputMgr - LISTENER(outputMgrApply); - LISTENER(outputMgrTest); - // Monitor part 2 the sequel DYNLISTENFUNC(monitorFrame); DYNLISTENFUNC(monitorDestroy); diff --git a/src/events/Misc.cpp b/src/events/Misc.cpp index 13dc85a3..a67a6753 100644 --- a/src/events/Misc.cpp +++ b/src/events/Misc.cpp @@ -16,16 +16,6 @@ // // // ------------------------------ // -void Events::listener_outputMgrApply(wl_listener* listener, void* data) { - const auto CONFIG = (wlr_output_configuration_v1*)data; - g_pHyprRenderer->outputMgrApplyTest(CONFIG, false); -} - -void Events::listener_outputMgrTest(wl_listener* listener, void* data) { - const auto CONFIG = (wlr_output_configuration_v1*)data; - g_pHyprRenderer->outputMgrApplyTest(CONFIG, true); -} - void Events::listener_leaseRequest(wl_listener* listener, void* data) { const auto REQUEST = (wlr_drm_lease_request_v1*)data; struct wlr_drm_lease_v1* lease = wlr_drm_lease_request_v1_grant(REQUEST); diff --git a/src/events/Monitors.cpp b/src/events/Monitors.cpp index 11b7a25c..69cc912d 100644 --- a/src/events/Monitors.cpp +++ b/src/events/Monitors.cpp @@ -16,50 +16,6 @@ // // // --------------------------------------------------------- // -void Events::listener_change(wl_listener* listener, void* data) { - // layout got changed, let's update monitors. - const auto CONFIG = wlr_output_configuration_v1_create(); - - if (!CONFIG) - return; - - for (auto& m : g_pCompositor->m_vRealMonitors) { - if (!m->output) - continue; - - if (g_pCompositor->m_pUnsafeOutput == m.get()) - continue; - - const auto CONFIGHEAD = wlr_output_configuration_head_v1_create(CONFIG, m->output); - - CBox BOX; - wlr_output_layout_get_box(g_pCompositor->m_sWLROutputLayout, m->output, BOX.pWlr()); - BOX.applyFromWlr(); - - //m->vecSize.x = BOX.width; - // m->vecSize.y = BOX.height; - m->vecPosition.x = BOX.x; - m->vecPosition.y = BOX.y; - - CONFIGHEAD->state.enabled = m->output->enabled; - CONFIGHEAD->state.mode = m->output->current_mode; - if (!m->output->current_mode) { - CONFIGHEAD->state.custom_mode = { - m->output->width, - m->output->height, - m->output->refresh, - }; - } - CONFIGHEAD->state.x = m->vecPosition.x; - CONFIGHEAD->state.y = m->vecPosition.y; - CONFIGHEAD->state.transform = m->transform; - CONFIGHEAD->state.scale = m->scale; - CONFIGHEAD->state.adaptive_sync_enabled = m->vrrActive; - } - - wlr_output_manager_v1_set_configuration(g_pCompositor->m_sWLROutputMgr, CONFIG); -} - static void checkDefaultCursorWarp(std::shared_ptr<CMonitor>* PNEWMONITORWRAP, std::string monitorName) { const auto PNEWMONITOR = PNEWMONITORWRAP->get(); |
