1
0
mirror of https://github.com/mpv-player/mpv synced 2025-03-11 08:37:59 +00:00

x11: minor cleanup

No reason for these functions to exist separately...
This commit is contained in:
wm4 2015-01-16 23:09:06 +01:00
parent fc524e8a07
commit 5649658c4e

View File

@ -1599,20 +1599,6 @@ static void vo_x11_fullscreen(struct vo *vo)
x11->pos_changed_during_fs = false; x11->pos_changed_during_fs = false;
} }
static void vo_x11_ontop(struct vo *vo)
{
struct mp_vo_opts *opts = vo->opts;
opts->ontop = !opts->ontop;
vo_x11_setlayer(vo, opts->ontop);
}
static void vo_x11_border(struct vo *vo)
{
vo->opts->border = !vo->opts->border;
vo_x11_decoration(vo, vo->opts->border);
}
int vo_x11_control(struct vo *vo, int *events, int request, void *arg) int vo_x11_control(struct vo *vo, int *events, int request, void *arg)
{ {
struct mp_vo_opts *opts = vo->opts; struct mp_vo_opts *opts = vo->opts;
@ -1624,14 +1610,14 @@ int vo_x11_control(struct vo *vo, int *events, int request, void *arg)
case VOCTRL_FULLSCREEN: case VOCTRL_FULLSCREEN:
opts->fullscreen = !opts->fullscreen; opts->fullscreen = !opts->fullscreen;
vo_x11_fullscreen(vo); vo_x11_fullscreen(vo);
*events |= VO_EVENT_RESIZE;
return VO_TRUE; return VO_TRUE;
case VOCTRL_ONTOP: case VOCTRL_ONTOP:
vo_x11_ontop(vo); opts->ontop = !opts->ontop;
vo_x11_setlayer(vo, opts->ontop);
return VO_TRUE; return VO_TRUE;
case VOCTRL_BORDER: case VOCTRL_BORDER:
vo_x11_border(vo); opts->border = !opts->border;
*events |= VO_EVENT_RESIZE; vo_x11_decoration(vo, vo->opts->border);
return VO_TRUE; return VO_TRUE;
case VOCTRL_GET_UNFS_WINDOW_SIZE: { case VOCTRL_GET_UNFS_WINDOW_SIZE: {
int *s = arg; int *s = arg;