diff options
Diffstat (limited to 'video/out')
-rw-r--r-- | video/out/vo.h | 1 | ||||
-rw-r--r-- | video/out/x11_common.c | 6 |
2 files changed, 7 insertions, 0 deletions
diff --git a/video/out/vo.h b/video/out/vo.h index c7ac9c9c59..98e13cd890 100644 --- a/video/out/vo.h +++ b/video/out/vo.h @@ -126,6 +126,7 @@ enum mp_voctrl { VOCTRL_GET_DISPLAY_FPS, // double* VOCTRL_GET_HIDPI_SCALE, // double* VOCTRL_GET_DISPLAY_RES, // int[2] + VOCTRL_GET_WINDOW_ID, // int64_t* /* private to vo_gpu and vo_gpu_next */ VOCTRL_EXTERNAL_RESIZE, diff --git a/video/out/x11_common.c b/video/out/x11_common.c index 5dc844da4d..b6c191d376 100644 --- a/video/out/x11_common.c +++ b/video/out/x11_common.c @@ -2118,6 +2118,12 @@ int vo_x11_control(struct vo *vo, int *events, int request, void *arg) ((int *)arg)[1] = selected_disp->rc.y1 - selected_disp->rc.y0; return VO_TRUE; } + case VOCTRL_GET_WINDOW_ID: { + if (!x11->window) + return VO_NOTAVAIL; + *(int64_t *)arg = x11->window; + return VO_TRUE; + } case VOCTRL_GET_HIDPI_SCALE: *(double *)arg = x11->dpi_scale; return VO_TRUE; |