Skip to content

Commit 3b3d8a8

Browse files
authored
drm: ensure disconnect called for removed connectors (#215)
Originally disconnected monitors were not removed from hyprland correctly and duplications were created when an external monitor was reattached leading to invalid behavior when switching (empty desktop is visible). Now removed monitors are explicitly disconnected during connectors scanning.
1 parent 81a0ddf commit 3b3d8a8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/backend/drm/DRM.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -847,12 +847,12 @@ void Aquamarine::CDRMBackend::scanConnectors() {
847847
}
848848

849849
// cleanup hot unplugged connectors
850-
std::erase_if(connectors, [resources](const auto& conn) {
850+
std::erase_if(connectors, [resources](auto& conn) {
851851
for (int i = 0; i < resources->count_connectors; ++i) {
852852
if (resources->connectors[i] == conn->id)
853853
return false;
854854
}
855-
855+
conn->disconnect();
856856
return true;
857857
});
858858

0 commit comments

Comments
 (0)