From a35a5bb5f3c67f867ac6a21cad479657085f0230 Mon Sep 17 00:00:00 2001 From: wm4 Date: Thu, 19 Jan 2017 16:30:38 +0100 Subject: x11: pseudo HiDPI scaling 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/x11_common.h | 1 + 1 file changed, 1 insertion(+) (limited to 'video/out/x11_common.h') diff --git a/video/out/x11_common.h b/video/out/x11_common.h index 6c92fdb480..e69640cc64 100644 --- a/video/out/x11_common.h +++ b/video/out/x11_common.h @@ -54,6 +54,7 @@ struct vo_x11_state { int display_is_local; int ws_width; int ws_height; + int dpi_scale; struct mp_rect screenrc; char *window_title; -- cgit v1.2.3