When enabling a monitor, set a mode

This commit is contained in:
Roberto Alsina 2020-02-03 16:48:30 -03:00
parent f5aaec79e0
commit 99c30ce7b9

View File

@ -117,6 +117,10 @@ class Window(QObject):
print(f"Setting {mon} enabled status to {enabled}") print(f"Setting {mon} enabled status to {enabled}")
monitor = self.xrandr_info[mon] monitor = self.xrandr_info[mon]
monitor["enabled"] = enabled monitor["enabled"] = enabled
if enabled and not monitor["current_mode"]:
# Choose a mode
self.ui.modes.setCurrentIndex(0)
self.mode_changed()
monitor["item"].update_visuals(monitor) monitor["item"].update_visuals(monitor)
def primary_changed(self): def primary_changed(self):