aboutsummaryrefslogtreecommitdiff
path: root/src/utils.c
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2024-11-08 23:57:59 +0100
committerdec05eba <dec05eba@protonmail.com>2024-11-08 23:57:59 +0100
commit76c565684f0bec0ac02062cba134abd0dd3ce1aa (patch)
tree02e2f14cc87ba6c22126d318f113920d351af4c2 /src/utils.c
parent34c0edc99170e6c7d738342334e3d0f39cba845b (diff)
Prefer drm cursor over x11 on x11, to fix correct position and size when x11 output is scaled
Diffstat (limited to 'src/utils.c')
-rw-r--r--src/utils.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/utils.c b/src/utils.c
index 976401f..a8e4dc2 100644
--- a/src/utils.c
+++ b/src/utils.c
@@ -94,9 +94,9 @@ void for_each_active_monitor_output_x11_not_cached(Display *display, active_moni
if(out_info && out_info->crtc && out_info->connection == RR_Connected) {
XRRCrtcInfo *crt_info = XRRGetCrtcInfo(display, screen_res, out_info->crtc);
if(crt_info && crt_info->mode) {
- // We want to use the current mode info width/height instead of crtc info width/height becuase crtc info is scaled if the monitor is scaled
- // (xrandr --output DP-1 --scale 1.5). Normally this is not an issue for x11 applications, but gpu screen recorder captures the drm framebuffer
- // instead of x11 api. This drm framebuffer which doesn't increase in size when using xrandr scaling.
+ // We want to use the current mode info width/height (mode_info->width/height) instead of crtc info width/height (crt_info->width/height) because crtc info
+ // is scaled if the monitor is scaled (xrandr --output DP-1 --scale 1.5). Normally this is not an issue for x11 applications,
+ // but gpu screen recorder captures the drm framebuffer instead of x11 api. This drm framebuffer which doesn't increase in size when using xrandr scaling.
// Maybe a better option would be to get the drm crtc size instead.
const XRRModeInfo *mode_info = get_mode_info(screen_res, crt_info->mode);
if(mode_info && out_info->nameLen < (int)sizeof(display_name)) {