diff options
author | wm4 <wm4@nowhere> | 2014-09-07 13:21:17 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-09-07 13:22:50 +0200 |
commit | 5546af421f853170ad3142008503bb865a81adef (patch) | |
tree | f82dd5ed052ceb9c9cdc19c06ea77a492bd5a27e | |
parent | 017b3fa9dbbed1bcd5711599e42513daf5009fd0 (diff) | |
download | mpv-5546af421f853170ad3142008503bb865a81adef.tar.bz2 mpv-5546af421f853170ad3142008503bb865a81adef.tar.xz |
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).
-rw-r--r-- | video/out/w32_common.c | 7 |
1 files changed, 2 insertions, 5 deletions
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; |