I've been trying to build a multi-monitor screensaver for work. Every person has different layouts, so I need to build the canvas dynamically to account for them. The simple goal is to blank all the screens to black and then put something on the primary monitor. I've tried a few libraries, and it seems like pygame is the most stable. I have the primary monitor portion of the code working, but none of the other monitors will black out. I can't understand what my hangup is. Any help would be appreciated. Below is the code to pull and blank the monitors. As a reminder, when I run it, only the primary screen is being blacked out.
import tkinter as tk
import sceeninfo
for monitor in screeninfo.get_monitors():
root = tk.Tk()
root.attributes('-fullscreen', True)
root.configure(bg='black')
root.overrideredirect(True)
root.geometry(f"{monitor.width}x{monitor.height}+{monitor.x}+{monitor.y}")
root.lift()
root.wm_attributes("-topmost", True)
canvas = tk.Canvas(root, bg='black', highlightthickness=0)
canvas.pack(fill=tk.BOTH, expand=True)
