From f3d5c7e185fe2081db86ed27b30fe567216074cd Mon Sep 17 00:00:00 2001 From: Quantum Date: Sat, 18 Jul 2026 14:51:08 -0400 Subject: [PATCH] [idd] helper: hook up exclusive monitor toggle to registry --- idd/LGIddHelper/CConfigWindow.cpp | 10 ++++++++++ idd/LGIddHelper/CConfigWindow.h | 1 + 2 files changed, 11 insertions(+) diff --git a/idd/LGIddHelper/CConfigWindow.cpp b/idd/LGIddHelper/CConfigWindow.cpp index 48207a6c..1db2a7ec 100644 --- a/idd/LGIddHelper/CConfigWindow.cpp +++ b/idd/LGIddHelper/CConfigWindow.cpp @@ -52,6 +52,7 @@ CConfigWindow::CConfigWindow() : m_scale(1) m_modes = m_settings.getModes(); m_defaultRefresh = m_settings.getDefaultRefresh(); m_noGPU = m_settings.getNoGPU(); + m_exclusive = m_settings.getExclusiveMonitor(); } if (!CreateWindowEx(0, MAKEINTATOM(s_atom), L"Looking Glass IDD Configuration", @@ -187,6 +188,9 @@ LRESULT CConfigWindow::onCreate() if (m_noGPU) m_prefNoGPU->setChecked(*m_noGPU); + if (m_exclusive) + m_prefExclusive->setChecked(*m_exclusive); + LONG width, height; getMinimumSize(width, height); SetWindowPos(m_hwnd, NULL, 0, 0, width, height, SWP_NOMOVE | SWP_NOZORDER); @@ -330,6 +334,12 @@ LRESULT CConfigWindow::onCommand(WORD id, WORD code, HWND hwnd) m_settings.setNoGPU(*m_noGPU); m_prefNoGPU->setChecked(*m_noGPU); } + else if (m_prefExclusive && hwnd == *m_prefExclusive && code == BN_CLICKED && m_exclusive) + { + *m_exclusive ^= true; + m_settings.setExclusiveMonitor(*m_exclusive); + m_prefExclusive->setChecked(*m_exclusive); + } else if (m_modeSave && hwnd == *m_modeSave && code == BN_CLICKED) { bool updated = false; diff --git a/idd/LGIddHelper/CConfigWindow.h b/idd/LGIddHelper/CConfigWindow.h index b5ab7aad..9d93627f 100644 --- a/idd/LGIddHelper/CConfigWindow.h +++ b/idd/LGIddHelper/CConfigWindow.h @@ -74,6 +74,7 @@ class CConfigWindow : public CWindow std::optional> m_modes; std::optional m_defaultRefresh; std::optional m_noGPU; + std::optional m_exclusive; void getMinimumSize(LONG &width, LONG &height); void updateFont();