diff options
author | wm4 <wm4@nowhere> | 2014-09-04 22:53:50 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-09-05 01:52:16 +0200 |
commit | e267ff93f32783e324c93395ab135e5b26f0efe1 (patch) | |
tree | 8a73106d88850bb466f85f9cc36ba5f158c4111f /video/out | |
parent | c15957b43a715563d405f42ec38c6c0ed1d477f9 (diff) | |
download | mpv-e267ff93f32783e324c93395ab135e5b26f0efe1.tar.bz2 mpv-e267ff93f32783e324c93395ab135e5b26f0efe1.tar.xz |
video: rename VOCTRL_GET_WINDOW_SIZE
Make it clear that this accesses the un-fullscreened window size.
Diffstat (limited to 'video/out')
-rw-r--r-- | video/out/cocoa_common.m | 4 | ||||
-rw-r--r-- | video/out/vo.h | 6 | ||||
-rw-r--r-- | video/out/w32_common.c | 4 | ||||
-rw-r--r-- | video/out/wayland_common.c | 4 | ||||
-rw-r--r-- | video/out/x11_common.c | 4 |
5 files changed, 12 insertions, 10 deletions
diff --git a/video/out/cocoa_common.m b/video/out/cocoa_common.m index a1ea157482..dc7a195442 100644 --- a/video/out/cocoa_common.m +++ b/video/out/cocoa_common.m @@ -656,7 +656,7 @@ int vo_cocoa_control(struct vo *vo, int *events, int request, void *arg) case VOCTRL_ONTOP: vo_cocoa_ontop(vo); return VO_TRUE; - case VOCTRL_GET_WINDOW_SIZE: { + case VOCTRL_GET_UNFS_WINDOW_SIZE: { int *s = arg; dispatch_on_main_thread(vo, ^{ NSSize size = [vo->cocoa->view frame].size; @@ -665,7 +665,7 @@ int vo_cocoa_control(struct vo *vo, int *events, int request, void *arg) }); return VO_TRUE; } - case VOCTRL_SET_WINDOW_SIZE: { + case VOCTRL_SET_UNFS_WINDOW_SIZE: { dispatch_on_main_thread(vo, ^{ int *s = arg; [vo->cocoa->window queueNewVideoSize:NSMakeSize(s[0], s[1])]; diff --git a/video/out/vo.h b/video/out/vo.h index 9e70bde310..602a4cc8c4 100644 --- a/video/out/vo.h +++ b/video/out/vo.h @@ -72,8 +72,10 @@ enum mp_voctrl { VOCTRL_SET_DEINTERLACE, VOCTRL_GET_DEINTERLACE, - VOCTRL_GET_WINDOW_SIZE, // int[2] (w/h) - VOCTRL_SET_WINDOW_SIZE, // int[2] (w/h) + // Return or set window size (not-fullscreen mode only - if fullscreened, + // these must access the not-fullscreened window size only). + VOCTRL_GET_UNFS_WINDOW_SIZE, // int[2] (w/h) + VOCTRL_SET_UNFS_WINDOW_SIZE, // int[2] (w/h) // The VO is supposed to set "known" fields, and leave the others // untouched or set to 0. diff --git a/video/out/w32_common.c b/video/out/w32_common.c index ed23727754..df2c53128f 100644 --- a/video/out/w32_common.c +++ b/video/out/w32_common.c @@ -1100,7 +1100,7 @@ static int gui_thread_control(struct vo_w32_state *w32, int *events, reinit_window_state(w32); *events |= VO_EVENT_RESIZE; return VO_TRUE; - case VOCTRL_GET_WINDOW_SIZE: { + case VOCTRL_GET_UNFS_WINDOW_SIZE: { int *s = arg; if (!w32->window_bounds_initialized) @@ -1110,7 +1110,7 @@ static int gui_thread_control(struct vo_w32_state *w32, int *events, s[1] = w32->current_fs ? w32->prev_height : w32->dh; return VO_TRUE; } - case VOCTRL_SET_WINDOW_SIZE: { + case VOCTRL_SET_UNFS_WINDOW_SIZE: { int *s = arg; if (!w32->window_bounds_initialized) diff --git a/video/out/wayland_common.c b/video/out/wayland_common.c index 614f9fd770..842e649812 100644 --- a/video/out/wayland_common.c +++ b/video/out/wayland_common.c @@ -1146,13 +1146,13 @@ int vo_wayland_control (struct vo *vo, int *events, int request, void *arg) case VOCTRL_ONTOP: vo_wayland_ontop(vo); return VO_TRUE; - case VOCTRL_GET_WINDOW_SIZE: { + case VOCTRL_GET_UNFS_WINDOW_SIZE: { int *s = arg; s[0] = wl->window.width; s[1] = wl->window.height; return VO_TRUE; } - case VOCTRL_SET_WINDOW_SIZE: { + case VOCTRL_SET_UNFS_WINDOW_SIZE: { int *s = arg; if (!wl->window.is_fullscreen) schedule_resize(wl, 0, s[0], s[1]); diff --git a/video/out/x11_common.c b/video/out/x11_common.c index ab55d6322a..46bf8c18d6 100644 --- a/video/out/x11_common.c +++ b/video/out/x11_common.c @@ -1547,7 +1547,7 @@ int vo_x11_control(struct vo *vo, int *events, int request, void *arg) vo_x11_border(vo); *events |= VO_EVENT_RESIZE; return VO_TRUE; - case VOCTRL_GET_WINDOW_SIZE: { + case VOCTRL_GET_UNFS_WINDOW_SIZE: { int *s = arg; if (!x11->window) return VO_FALSE; @@ -1555,7 +1555,7 @@ int vo_x11_control(struct vo *vo, int *events, int request, void *arg) s[1] = x11->fs ? RC_H(x11->nofsrc) : RC_H(x11->winrc); return VO_TRUE; } - case VOCTRL_SET_WINDOW_SIZE: { + case VOCTRL_SET_UNFS_WINDOW_SIZE: { int *s = arg; if (!x11->window) return VO_FALSE; |