win32: copy event flags after running VOCTRLs

reinit_window_state() will set VO_EVENT_RESIZE when it runs, so we
don't need to set it manually depending on the VOCTRL.

Probably avoids duplicated resize events. I don't expect this actually
fixes anything, but might help spotting other bugs easier (if there
are any).
This commit is contained in:
wm4 2014-09-07 13:21:17 +02:00
parent 017b3fa9db
commit 5546af421f
1 changed files with 2 additions and 5 deletions

View File

@ -1083,13 +1083,10 @@ static bool vo_w32_is_cursor_in_client(struct vo_w32_state *w32)
static int gui_thread_control(struct vo_w32_state *w32, int *events,
int request, void *arg)
{
*events |= w32->event_flags;
w32->event_flags = 0;
switch (request) {
case VOCTRL_FULLSCREEN:
if (w32->opts->fullscreen != w32->current_fs)
reinit_window_state(w32);
*events |= VO_EVENT_RESIZE;
return VO_TRUE;
case VOCTRL_ONTOP:
w32->opts->ontop = !w32->opts->ontop;
@ -1098,7 +1095,6 @@ static int gui_thread_control(struct vo_w32_state *w32, int *events,
case VOCTRL_BORDER:
w32->opts->border = !w32->opts->border;
reinit_window_state(w32);
*events |= VO_EVENT_RESIZE;
return VO_TRUE;
case VOCTRL_GET_UNFS_WINDOW_SIZE: {
int *s = arg;
@ -1124,7 +1120,6 @@ 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_SET_CURSOR_VISIBILITY:
@ -1164,6 +1159,8 @@ static void do_control(void *ptr)
void *arg = p[3];
int *ret = p[4];
*ret = gui_thread_control(w32, events, request, arg);
*events |= w32->event_flags;
w32->event_flags = 0;
// Safe access, since caller (owner of vo) is blocked.
if (*events & VO_EVENT_RESIZE) {
w32->vo->dwidth = w32->dw;