diff options
author | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2010-07-23 03:30:44 +0300 |
---|---|---|
committer | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2010-07-23 03:38:40 +0300 |
commit | 7a669a64073839a0d014f20a691014e332faaf69 (patch) | |
tree | 902d9faa1381aaeb992ace2a75b8d4626328212a /libvo/x11_common.h | |
parent | 8362ad36ac2ee8dc452765a9de559b50927d14be (diff) | |
download | mpv-7a669a64073839a0d014f20a691014e332faaf69.tar.bz2 mpv-7a669a64073839a0d014f20a691014e332faaf69.tar.xz |
vo: improve fixed-vo behavior when video size changes in x11 VOs
Now the window is only resized when video size (or size specified by
-geometry) changes; reconfiguring the window with the same size no
longer changes back to default size from possibly user-modified one.
Also fix a bug in fullscreen handling that could cause incorrect
window size when turning fullscreen off.
Diffstat (limited to 'libvo/x11_common.h')
-rw-r--r-- | libvo/x11_common.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/libvo/x11_common.h b/libvo/x11_common.h index 6ae51f87c2..459bd07e20 100644 --- a/libvo/x11_common.h +++ b/libvo/x11_common.h @@ -20,6 +20,7 @@ #define MPLAYER_X11_COMMON_H #include <stdint.h> +#include <stdbool.h> #include <X11/Xlib.h> #include <X11/Xutil.h> @@ -61,6 +62,17 @@ struct vo_x11_state { int vo_old_width; int vo_old_height; + /* Keep track of original video width/height to determine when to + * resize window when reconfiguring. Resize window when video size + * changes, but don't force window size changes as long as video size + * stays the same (even if that size is different from the current + * window size after the user modified the latter). */ + int last_video_width; + int last_video_height; + /* Video size changed during fullscreen when we couldn't tell the new + * size to the window manager. Must set window size when turning + * fullscreen off. */ + bool size_changed_during_fs; unsigned int olddecor; unsigned int oldfuncs; |