Set the input region for the ui surfaces
Use the input region to calculate the panel size