don't add existing and invalid monitors
This commit is contained in:
parent
f5645805d8
commit
b76b32b458
3 changed files with 21 additions and 0 deletions
|
|
@ -255,6 +255,16 @@ SMonitor* CCompositor::getMonitorFromID(const int& id) {
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
SMonitor* CCompositor::getMonitorFromName(const std::string& name) {
|
||||
for (auto& m : m_lMonitors) {
|
||||
if (m.szName == name) {
|
||||
return &m;
|
||||
}
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
SMonitor* CCompositor::getMonitorFromCursor() {
|
||||
const auto COORDS = Vector2D(m_sWLRCursor->x, m_sWLRCursor->y);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue