summaryrefslogtreecommitdiffstats
path: root/video/out/wayland_common.h
diff options
context:
space:
mode:
authorAlexander Preisinger <alexander.preisinger@gmail.com>2013-05-07 20:51:09 +0200
committerAlexander Preisinger <alexander.preisinger@gmail.com>2013-05-07 21:21:37 +0200
commit2c6c842719b19c0c71c188e7337f15bb60f2585c (patch)
tree0e9d914713b3af9190b377a91764d59b64046286 /video/out/wayland_common.h
parentc653697610d6af2125a2d03be4c5bc92982484cc (diff)
downloadmpv-2c6c842719b19c0c71c188e7337f15bb60f2585c.tar.bz2
mpv-2c6c842719b19c0c71c188e7337f15bb60f2585c.tar.xz
wayland: reworked resizing
This fixes 2 bugs: * Resizing very fast breaks the aspect of the window and the width and height don't match with the video anymore * Pressing 'f' for fullscreen very fast can overwrite the backup variables for the previous width and height. Also includes a better aspect calculation with fluid resizing.
Diffstat (limited to 'video/out/wayland_common.h')
-rw-r--r--video/out/wayland_common.h20
1 files changed, 14 insertions, 6 deletions
diff --git a/video/out/wayland_common.h b/video/out/wayland_common.h
index 9c03dca7e5..d5259242bf 100644
--- a/video/out/wayland_common.h
+++ b/video/out/wayland_common.h
@@ -35,6 +35,8 @@ enum vo_wayland_window_type {
};
struct vo;
+struct vo_wayland_state;
+
struct vo_wayland_output {
uint32_t id; /* unique name */
@@ -81,17 +83,23 @@ struct vo_wayland_window {
int32_t p_width;
int32_t p_height;
- int32_t pending_width;
- int32_t pending_height;
- uint32_t edges;
- int resize_needed;
-
struct wl_surface *surface;
struct wl_shell_surface *shell_surface;
- int events; /* mplayer events */
+ int events; /* mplayer events (VO_EVENT_RESIZE) */
enum vo_wayland_window_type type; /* is fullscreen */
+
+ /* Because the egl windows have a special resize windw function we have to
+ * register it first before doing any resizing.
+ * This makes us independet from the output driver */
+ void (*resize_func) (struct vo_wayland_state *wl,
+ uint32_t edges,
+ int32_t width,
+ int32_t height,
+ void *user_data);
+
+ void *resize_func_data;
};
struct vo_wayland_input {