tweak output # detection

This commit is contained in:
piotr
2023-01-08 01:18:44 +01:00
parent fc901223c4
commit 0e8546ef3e

View File

@@ -116,13 +116,8 @@ def check_tree():
num = num_active_outputs(tree) num = num_active_outputs(tree)
if num != common.outputs_num: if num != common.outputs_num:
if num < common.outputs_num: if num < common.outputs_num:
print("Number of outputs decreased {}, restarting".format(num)) Gdk.threads_add_timeout(GLib.PRIORITY_DEFAULT_IDLE, common_settings["restart-delay"], restart)
restart() # restart()
else:
print("Number of outputs increased ({}); restart in {} ms."
.format(num, common_settings["restart-delay"]))
# Gdk.threads_add_timeout(GLib.PRIORITY_DEFAULT_IDLE, common_settings["restart-delay"], restart)
restart()
for item in common.taskbars_list: for item in common.taskbars_list:
item.refresh(tree) item.refresh(tree)