summaryrefslogtreecommitdiffstats
path: root/video/out/wayland_common.h
diff options
context:
space:
mode:
authorAlexander Preisinger <alexander.preisinger@gmail.com>2014-01-07 21:12:24 +0100
committerwm4 <wm4@nowhere>2014-01-15 20:49:32 +0100
commit0fe1385d80de4acf7d600700e0fe8ed1d884c172 (patch)
tree5d43ad2f308a996ab38b926f273e49cad22dc57a /video/out/wayland_common.h
parentf4e9371d0f33fea115f1390a0f5280f102dd6f98 (diff)
downloadmpv-0fe1385d80de4acf7d600700e0fe8ed1d884c172.tar.bz2
mpv-0fe1385d80de4acf7d600700e0fe8ed1d884c172.tar.xz
wayland: fix fullscreen & resizing for good
I added enough logic to never set ontop or fullscreen twitce. This commit keeps also the size of the video if multiple videos are played. If the ratio differs the width will be kept at the same size and only the height changes.
Diffstat (limited to 'video/out/wayland_common.h')
-rw-r--r--video/out/wayland_common.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/video/out/wayland_common.h b/video/out/wayland_common.h
index efbe071f9d..ecfe6fc928 100644
--- a/video/out/wayland_common.h
+++ b/video/out/wayland_common.h
@@ -80,7 +80,7 @@ struct vo_wayland_state {
} display;
struct {
- int32_t width;
+ int32_t width; // current size of the window
int32_t height;
int32_t p_width; // previous sizes for leaving fullscreen
int32_t p_height;
@@ -90,7 +90,10 @@ struct vo_wayland_state {
int32_t sh_y;
float aspect;
+ bool is_init; // true if the window has a valid size
bool is_fullscreen; // don't keep aspect ratio in fullscreen mode
+ int32_t fs_width; // fullscreen sizes
+ int32_t fs_height;
struct wl_surface *surface;
int32_t mouse_x; // mouse position inside the surface