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
committerAlexander Preisinger <alexander.preisinger@gmail.com>2014-01-07 21:12:24 +0100
commit374f40de30178e080f24bfd9f1dc3ece2f97c8bd (patch)
tree249283ad3ccf293a91ee4c5d5cef9b28299a5e02 /video/out/wayland_common.h
parentbde15f33016edc61c612b9f99cf01094633caa97 (diff)
downloadmpv-374f40de30178e080f24bfd9f1dc3ece2f97c8bd.tar.bz2
mpv-374f40de30178e080f24bfd9f1dc3ece2f97c8bd.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 ac5fc3cf39..3bad89b367 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