mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-10-08 19:16:27 +00:00
wayland/core: move to new impl (#6268)
* wayland/core/dmabuf: move to new impl it's the final countdown
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
#include "OutputPower.hpp"
|
||||
#include "../Compositor.hpp"
|
||||
#include "core/Output.hpp"
|
||||
|
||||
#define LOGM PROTO::outputPower->protoLog
|
||||
|
||||
@@ -61,15 +62,15 @@ void COutputPowerProtocol::destroyOutputPower(COutputPower* power) {
|
||||
|
||||
void COutputPowerProtocol::onGetOutputPower(CZwlrOutputPowerManagerV1* pMgr, uint32_t id, wl_resource* output) {
|
||||
|
||||
const auto PMONITOR = g_pCompositor->getMonitorFromOutput(wlr_output_from_resource(output));
|
||||
const auto OUTPUT = CWLOutputResource::fromResource(output);
|
||||
|
||||
if (!PMONITOR) {
|
||||
if (!OUTPUT) {
|
||||
pMgr->error(0, "Invalid output resource");
|
||||
return;
|
||||
}
|
||||
|
||||
const auto CLIENT = pMgr->client();
|
||||
const auto RESOURCE = m_vOutputPowers.emplace_back(std::make_unique<COutputPower>(makeShared<CZwlrOutputPowerV1>(CLIENT, pMgr->version(), id), PMONITOR)).get();
|
||||
const auto RESOURCE = m_vOutputPowers.emplace_back(std::make_unique<COutputPower>(makeShared<CZwlrOutputPowerV1>(CLIENT, pMgr->version(), id), OUTPUT->monitor.get())).get();
|
||||
|
||||
if (!RESOURCE->good()) {
|
||||
pMgr->noMemory();
|
||||
|
Reference in New Issue
Block a user