From 5546af421f853170ad3142008503bb865a81adef Mon Sep 17 00:00:00 2001 From: wm4 Date: Sun, 7 Sep 2014 13:21:17 +0200 Subject: 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). --- video/out/w32_common.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'video/out') diff --git a/video/out/w32_common.c b/video/out/w32_common.c index df2c53128f..4090200810 100644 --- a/video/out/w32_common.c +++ b/video/out/w32_common.c @@ -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; -- cgit v1.2.3