# HG changeset patch # User ib # Date 1375377146 0 # Node ID 3a1b89dc7070bbeaaf7a81dad48356a1d74e116a # Parent 428bd1b127bd236009260bd169feff7db0224811 Place GUI_HANDLE_EVENTS calls after GUI_REDRAW calls. The redraw will generate events, which should be handled afterwards (if already in the event queue). diff -r 428bd1b127bd -r 3a1b89dc7070 mplayer.c --- a/mplayer.c Thu Aug 01 17:10:10 2013 +0000 +++ b/mplayer.c Thu Aug 01 17:12:26 2013 +0000 @@ -2564,8 +2564,8 @@ mpctx->video_out->check_events(); #ifdef CONFIG_GUI if (use_gui) { + gui(GUI_REDRAW, 0); gui(GUI_HANDLE_EVENTS, 0); - gui(GUI_REDRAW, 0); if (guiInfo.Playing != GUI_PAUSE || (rel_seek_secs || abs_seek_pos)) break; } @@ -3095,8 +3095,8 @@ while (guiInfo.Playing != GUI_PLAY) { mp_cmd_t *cmd; usec_sleep(20000); + gui(GUI_REDRAW, 0); gui(GUI_HANDLE_EVENTS, 0); - gui(GUI_REDRAW, 0); if ((cmd = mp_input_get_cmd(0, 0, 0)) != NULL) { if (cmd->id == MP_CMD_GUI) gui(GUI_RUN_MESSAGE, cmd->args[0].v.s); @@ -3996,7 +3996,6 @@ #ifdef CONFIG_GUI if (use_gui) { - gui(GUI_HANDLE_EVENTS, 0); if (mpctx->demuxer->file_format == DEMUXER_TYPE_AVI && mpctx->sh_video && mpctx->sh_video->video.dwLength > 2) { // get pos from frame number / total frames guiInfo.Position = (float)mpctx->d_video->pack_no * 100.0f / mpctx->sh_video->video.dwLength; @@ -4010,6 +4009,7 @@ guiInfo.RunningTime = demuxer_get_time_length(mpctx->demuxer); gui(GUI_SET_MIXER, 0); gui(GUI_REDRAW, 0); + gui(GUI_HANDLE_EVENTS, 0); if (guiInfo.Playing == GUI_STOP) break; // STOP if (guiInfo.Playing == GUI_PAUSE)