Avoid top level global pointers, remove the window_manager pointer and move the clipboard mutex along side the clipboard data. Also skip updating window DPI if the window doesn't use the output that changed it's scale.