diff options
author | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2009-09-19 00:00:42 +0300 |
---|---|---|
committer | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2009-09-19 00:00:42 +0300 |
commit | 3c70c5dc955bb0d5b67e831d98d1db95fbb03f9e (patch) | |
tree | 270a782ac99712e4209a4a37dfe106dc387dc25f /TOOLS | |
parent | 56088ff4dc5180e95ea0c60f86a4b5ffc5c76611 (diff) | |
download | mpv-3c70c5dc955bb0d5b67e831d98d1db95fbb03f9e.tar.bz2 mpv-3c70c5dc955bb0d5b67e831d98d1db95fbb03f9e.tar.xz |
vo_vdpau: Fix X event handling bugs
check_events() first checked for a RESIZE event and called resize() if
needed, and then queued a frame to be reshown if in pause state and
the event was either RESIZE or EXPOSE. The most obvious problems with
the code were:
- resize() already called flip_page() internally, so the code in
check_events could lead to _two_ frames being queued.
- The call in resize() didn't depend on pause status, so the
behavior was inconsistent.
- The code in check_events() actually queued the wrong output
surface. It showed the same surface as flip_page() would show
_next_, while it should have shown the previously shown one. This
typically led to the screen contents changing to a previous
state, as the new surface had not been initialized and had
contents from a previous use.
Fix the double update. Make resize() also only immediately update the
video if paused (this also affects changing to/from fullscreen) and
otherwise leave the old window contents be until the next frame. Queue
the right frame in check_events(). Also make resize() a bit more
careful to only show contents if they were successfully updated
(though a case where we're paused without content to show shouldn't
normally happen).
Diffstat (limited to 'TOOLS')
0 files changed, 0 insertions, 0 deletions