summaryrefslogtreecommitdiffstats
path: root/video/out/win_state.h
Commit message (Collapse)AuthorAgeFilesLines
* win_state: add vo_calc_window_geometry3Avi Halachmi (:avih)2021-09-061-0/+3
| | | | | | | | | | | | | | | | | vo_calc_window_geometry2 (VCWG2) calculates both the pixelaspect and the autofit sizes based on one "screen" rectangle. However, these two calculations might need two different "screen" rects if the fit should take into account decorations and/or taskbar etc, while pixelaspect should be based on the full (monitor) rect. VCWG3 does just that. It's the same as VCWG2, but with an additional monitor rect which is used exclussively to calculate pixelaspect, while the "screen" argument is used for fitting (like before). VCWG2 now uses/calls VCWG3 with the same screen and monitor rects. Currently yet unused.
* x11: pseudo HiDPI scalingwm42017-01-191-0/+2
| | | | | | | | | | | | | | | | Scale the window by the assumed DPI scaling factor, using 96 DPI as base. For example, a screen that reports 192 DPI is assumed to have a DPI scale factor 2. The window will then be created with twice the size. For robustness reasons, we accept only integer DPI scales between 1 and 9. We also error out if the X and Y scales are very different, as this most likely indicates a multiscreen system with botched size reporting. I'm not sure if reading the X server's DPI is such a good idea - maybe the Xrdb "Xft.dpi" value should be used instead. The current method follows what xdpyinfo does. This can be disabled with --hidpi-window-scale=no.
* video/out: separate out code to compute window sizewm42014-05-061-0/+30
Currently, vo_reconfig() calculates the requested window size and sets the vo->dwidth/dheight fields _if_ VOCTRL_UPDATE_SCREENINFO is implemented by the VO or the windowing backend. The window size can be different from the display size if e.g. the --geometry option is used. It will also set the vo->dx/dy fields and read vo->xinerama_x/y. It turned out that this is very backwards and actually requires the windowing backends to workaround these things. There's also MPOpts.screenwidth/screenheight, which used to map to actual options, but is now used only to communicate the screen size to the vo.c code calculating the window size and position. Change this by making the window geometry calculations available as separate functions. This commit doesn't change any VO code yet, and just emulates the old way using the new functions. VO code will remove its usage of VOCTRL_UPDATE_SCREENINFO and use the new functions directly.