File indexing completed on 2025-03-23 11:13:32
0001 /* 0002 KWin - the KDE window manager 0003 This file is part of the KDE project. 0004 0005 SPDX-FileCopyrightText: 2021 Xaver Hugl <xaver.hugl@gmail.com> 0006 0007 SPDX-License-Identifier: GPL-2.0-or-later 0008 */ 0009 #include "outputconfiguration.h" 0010 0011 namespace KWin 0012 { 0013 0014 std::shared_ptr<OutputChangeSet> OutputConfiguration::changeSet(Output *output) 0015 { 0016 const auto ptr = constChangeSet(output); 0017 m_properties[output] = ptr; 0018 return ptr; 0019 } 0020 0021 std::shared_ptr<OutputChangeSet> OutputConfiguration::constChangeSet(Output *output) const 0022 { 0023 if (!m_properties.contains(output)) { 0024 auto props = std::make_shared<OutputChangeSet>(); 0025 props->enabled = output->isEnabled(); 0026 props->pos = output->geometry().topLeft(); 0027 props->scale = output->scale(); 0028 props->mode = output->currentMode(); 0029 props->transform = output->transform(); 0030 props->overscan = output->overscan(); 0031 props->rgbRange = output->rgbRange(); 0032 props->vrrPolicy = output->vrrPolicy(); 0033 return props; 0034 } 0035 return m_properties[output]; 0036 } 0037 }