mirror of
https://github.com/ralsina/xrandroll.git
synced 2024-11-22 11:02:22 +00:00
Handle starting with turned-off monitors Fix #2
This commit is contained in:
parent
b3c03fe723
commit
fbe63db894
@ -366,6 +366,10 @@ class Window(QObject):
|
|||||||
self.ui.modes.clear()
|
self.ui.modes.clear()
|
||||||
for mode in self.xrandr_info[name]["modes"]:
|
for mode in self.xrandr_info[name]["modes"]:
|
||||||
self.ui.modes.addItem(mode)
|
self.ui.modes.addItem(mode)
|
||||||
|
if self.xrandr_info[name]["current_mode"] is None: # Happens with turned off monitors
|
||||||
|
self.xrandr_info[name]['enabled'] = False
|
||||||
|
h_scale = v_scale = 1
|
||||||
|
else:
|
||||||
self.ui.modes.setCurrentText(self.xrandr_info[name]["current_mode"])
|
self.ui.modes.setCurrentText(self.xrandr_info[name]["current_mode"])
|
||||||
mod_x, mod_y = [
|
mod_x, mod_y = [
|
||||||
int(x) for x in self.xrandr_info[name]["current_mode"].split("x")
|
int(x) for x in self.xrandr_info[name]["current_mode"].split("x")
|
||||||
|
Loading…
Reference in New Issue
Block a user