Skip to content

Commit

Permalink
DisplaysOverlay: revert check_configuration_changed from #376
Browse files Browse the repository at this point in the history
  • Loading branch information
danirabbit committed May 15, 2024
1 parent 5c2fa07 commit 7012e2b
Showing 1 changed file with 2 additions and 31 deletions.
33 changes: 2 additions & 31 deletions src/Widgets/DisplaysOverlay.vala
Original file line number Diff line number Diff line change
Expand Up @@ -241,37 +241,8 @@ public class Display.DisplaysOverlay : Gtk.Box {
}

private void check_configuration_change () {
// check if valid (connected)
var result = true;
foreach (unowned var dw in display_widgets) {
dw.connected = false;
}

foreach (unowned var dw1 in display_widgets) {
foreach (unowned var dw2 in display_widgets) {
if (dw2 == dw1) {
warning ("Skip %s", dw2.display_name);
continue;
} else if (dw1.connected) {
warning ("%s already connected", dw1.display_name);
break;
}

dw1.connected = is_connected (dw1, dw2);
if (dw1.connected) {
dw2.connected = true;
}
}
}

foreach (unowned var dw in display_widgets) {
if (!dw.connected) {
result = false;
break;
}
}

configuration_changed (result);
// TODO check if it actually has changed
configuration_changed (true);
}

// Determine whether two displays adjoin but do not overlap
Expand Down

0 comments on commit 7012e2b

Please sign in to comment.