Closed granolaonicecream closed 2 years ago
libxinerama can provide discovery of the monitors, resolution, and offsets which should be enough to normalize window coordinates. This same information could be obtained from libxrandr, but I don't know which extension is more acceptable to expect users to have. Both seem equally likely, but either way, a compile flag should be created to allow users that don't need multihead support.
While per desktop scale factors would be convenient, I can't make assumptions about how window managers move windows to other unmapped desktops.
For example, a typical shift of a window in xmonad does not relayout the windows of the target workspace unless it is currently visible. This means the window's previous geometry is preserved until the workspace is brought into view. This is reasonable behavior, but does leave xdpager unable to rely on a desktop's last known resolution to appropriately normalize coordinates and scale the rectangles.
The easiest solution was just to add the normalization on a per window basis. This avoids having to track windows moving around between desktops.
XDPager currently supports a statically defined screen configuration (2x 2560x1440 monitors horizontal). In order to support other setups, the following must be done: