This involves restructuring the OTP calculations to take some EWMH information as a default if the user doesn't have anything (e.g., from the config file) to override it, and allowing that and the various OTP f.whatever functions to set a base priority. Then various EWMH related actions can also set affect flags which add offsets from that base priority to determine the effective priority. Those calculations can then be run at any time to determine where the window is actually placed.